MySQL NoInstall configuration, mysqlnoinstall
1. Download mysql-mysql-5.1.55-win32.zip
2. decompress the package to any directory. The directory name should not contain spaces;
Example: C: \ mysql
3. Delete the four directories Embedded, include, lib, and mysql-test.
Note: These four directories account for more than 300 MB, and less than 100 mb is deleted.
3, in c: \ mysql copy the my-huge.ini to generate my. ini;
Open my. ini and add
Basedir = C: \ mysql \
Datadir = C: \ mysql \ data \
4. Write the startup script startup. bat and place it in the C: \ mysql \ bin path.
The content is as follows:
@ Echo off
Echo start mysql on localhost
Mysqld -- install mysql -- defaults-file = c: \ mysql \ my. ini
Net start mysql5
Pause
This startup script registers mysql to the system service.
5. stop the script stop. bat in the path C: \ mysql \ bin. The stop script uninstalls MySQL from the System Service:
@ Echo off
Echo stop mysql
Net stop mysql
Mysqld -- remove mysql5
Pause
6. After the configuration is complete, double-click the startup. bat batch file in the path C: \ mysql \ bin. A mysql service is available in the system service and has been started,
7. Then test the database installation. In the dos window, enter mysqlshow
C: \ mysql \ bin> mysqlshow
+ -------------------- +
| Databases |
+ -------------------- +
| Information_schema |
| Test |
+ -------------------- +
The above information indicates that the database is successfully installed and other test commands are available:
Mysqlshow-u root mysql
Mysqladmin-u root version status proc
8. Open remote connection
C: \ mysql \ bin \> mysql-h localhost-u root // enter the MySQL server.
Mysql> grant all privileges on *. * TO 'root' @ '%' with grant option // GRANT data access permissions TO any host
Mysql> flush privileges // The modification takes effect.
Mysql> EXIT // EXIT the MySQL server
In this way, you can log on to any other host as the root user!