MySQL NoInstall configuration, mysqlnoinstall

Source: Internet
Author: User
Tags stop script

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!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.