自刨自吃,闲云野鹤,眼净心净,天宽地宽。
Archive for December 28, 2007
A few tips about how to use mysql-5.1-noinstall package
04 years ago
in TechniquE
HOW-TO Install
- Download the install package, filename is mysql-noinstall-5.1.22-rc-win32.zip in this case.
- Extract it to the installation location, traditionally, the MySQL server uses “c:\mysql”, but my option is “e:\HTTPD\mysql”, any location you like is OK.
-
Create your own config file, it’s a good idea to put this file in your MySQL server installation location, not the system path. You may create this file just containing a [mysqld] section:
1
2
3
4
5[mysqld]
# set basedir to your installation path
basedir=E:\\HTTPD\\mysql
# set datadir to the location of your data directory
datadir=E:\\HTTPD\\mysql\\data -
Install MySQL as a Windows service, use the command:
1
2mysqld --install-manual MYSQL51 --defaults-file=e:\HTTPD\mysql\my.ini
mysqld --install MYSQL51 --defaults-file=e:\HTTPD\mysql\my.iniEither of the above is ok, the difference is the first command will install the service started manually. “MYSQL51″ is the service name.
-
Start the service, enter this command:
1net start MYSQL51 -
Now, all the steps are finished! You can use this:
1mysql -u rootto confirm your MySQL is running.
Notes
- MySQL looks for options first in the my.ini file, and then in the my.cnf file, so it’s better to name the config file my.ini
- You may just modify one of the my-*.ini files and rename it to my.ini, according to your situation.
- A root use is set by default, and no root password set. So DON’T use -p option in the command below until you’ve set a root password.
Some useful commands
1 2 3 4 5 6 | REM Start MySQL server directly, not using Windows service mysqld --consol REM Shutdown MySQL server mysqladmin -u root shutdown REM Remove MySQL service mysqld --remove MYSQL51 |
Recent Comments