Install, set, and start MySQL Green Edition

Source: Internet
Author: User
Tags ip number mysql update mysql gui mysql gui tools
1, extract the mysql-noinstall-5.1.30-win32.zip (http://dev.mysql.com/downloads/mysql/5.1.html) 2, in the f disk to establish the directory MySQL \ mysqlserver5.1 \ 3, copy the extracted content to F: \ mysql \ mysqlserver5.1 \ 4, in F: \ mysql \ mysqlserver5.1 \ find my-large.ini to copy it to my. ini5, in my. find [mysqld] in ini and add the following statement;
Basedir = "F:/MySQL/mysqlserver5.1/" NOTE: If the \ slash of the window is used, use two \ slashes. Otherwise, an error is reported when the service is started. 1067 error. Datadir = "F: // MySQL/mysqlserver5.1/data/" default-character-set = Latin1 # utf8default-storage-engine = InnoDB max_allowed_packet = 12 m
# Skip-networking # // network login will be ignored # bind-address = 192.168.0.72 # // if you add this localhost, you will not be able to restart the service as long as the user table 127.0.0.1 is set to %. remote Login
6, install mysql_administrator_1.2 green version: extract the mysql-gui-tools-noinstall-5.0-r14-win32.zip to F: \ mysql GUI tools 5.06.5, you can try to manually start the MySQL server, and use mysql_administrator_1.2 and console login: 1, manually start the service: CMD --> F: \ mysql \ mysqlserver5.1 \ bin \ mysqld -- console, InnoDB: The first specified datafile c: \ ibdata \ ibdata1 did not exist: InnoDB: A new database to be created! InnoDB: setting file c: \ ibdata \ ibdata1 size to 209715200 InnoDB: Database physically writes the file full: Wait... and so on. Finally, we can see mysqld: Ready for connections version: '5. 1.2-Alpha 'socket: ''port: 3306 indicates that the MySQL service has been started and can be logged on. At this time, the login name is root and the password is blank. The IP address can only be set to localhost or 127.0.0.1, currently, the root permission only allows local login. Remote Login is not allowed. MySQL cannot log on to the local machine by writing the local IP address, error 1130 2. mysql_administrator_1.2: log on to F: \ mysql Gu I tools 5.0 \ Run mysqladministrator.exe, fill in localhost or 127.0.0.1 3306. If the root password is null, you can log on to it. 3. log on to the console: cmd --> F: \ mysql \ mysqlserver5.1 \ bin \ mysql-u root-P password is blank if you want to select a database during login, you can write: F: \ mysql \ mysqlserver5.1 \ bin \ mysql-u root-P [Password] [database name] current situation example: F: \ mysql \ mysqlserver5.1 \ bin \ mysql-u root-P MySQL indicates that the password is empty, log on to the MySQL database 4. Modify the root password, allow the root user to log on remotely, and add new users to change the root password: Enter use MySQL update user set in the console after logon. Password = PASSWORD ('[Password]') where user = 'root'; allow the root user to log on remotely: on the console after login, enter use MySQL update user set host = '%' where user = 'root' and host = '2017. 0.0.1 '; Add a new user. The user name is Gary. The password is blank. The permission is equal to root. The user can log on remotely: Enter grant all privileges on * in the console after logon *. * To 'gary '@' % '; if the user cannot log on remotely: grant all privileges on *. * To 'gary '@ 'localhost'; then use the following method to change Gary's password, change root to Gary 5, and manually stop the MySQL service: cmd --> F: \ mysql \ mysqlserver5.1 \ bin \ MYS Qladmin-u root Shutdown if the MySQL Root User Account has a password, you need to call the command F: \ mysql \ mysqlserver5.1 \ bin \ mysqladmin-u root-P shutdown and enter the password as prompted. Note: change the password and whether to log on remotely, after a user is added, the MySQL service must be restarted to take effect !!!!!!!!!!!!!!!!!!!!!!!!!!! Note: users in the MySQL permission system are completely independent of logon users in windows. 7. Add the MySQL service to the Windows Service: 1. Easy to add: cmd --> F: \ mysql \ mysqlserver5.1 \ bin \ mysqld -- install to add a Windows service with the default MySQL name. This is because the Service property is: F: \ mysql \ mysqlserver5.1 \ bin \ mysqld MySQL 2. Specify the service name and the method for adding the specified startup option file: F: \ mysql \ mysqlserver5.1 \ bin \ mysqld -- install leveldbserver -- defaults-file = F: \ mysql \ mysqlserver5.1 \ My. INI uses leveldbserver as the name to create a Windows service. Specify F: \ mysql \ mysqlserver5.1 \ My. INI is the MySQL startup option File
In the service installation command, the service name specified after the -- install option is not the default service name (MySQL ). Read the option from the group with the same service name and read the option from the standard option file. The server also reads the option from the [mysqld] Group of the standard option file. You can use the options in the [mysqld] group for all MySQL services, or use a group with the same service name for the server corresponding to the service name.
In this command, the default service name (MySQL) is provided after the -- install option ). If the -- defaults-file option is not provided, this command allows the server to read from the [mysqld] Group of the standard option file. Because the -- defaults-file option is provided, the server only reads the option from the [mysqld] Group of the named file. Note: the service is not started after the service is added. Restart the computer service and start it. To manually start and close the MySQL service, run the following statement: cmd --> Net start MySQL or net start leveldbserver, net stop MySQL or net stop leveldbserver.
8. To test MySQL installation, run the following command to test whether the MySQL server works: C: \> F: \ mysql \ mysqlserver5.1 \ bin \ mysqlshowc: \> F: \ mysql \ mysqlserver5.1 \ bin \ mysqlshow-u root mysqlc: \> F: \ mysql \ mysqlserver5.1 \ bin \ mysqladmin version status procc: \> F: \ mysql \ mysqlserver5.1 \ bin \ mysql test if mysqld responds slowly to the client program's TCP/IP connection, it may be a DNS problem. In this case, use the -- skip-name-resolve option to start mysqld, and only use localhost and IP number in the host column of the MySQL authorization table. You can use the -- pipe or -- protocol = pipe option to force the mysql client to use the named pipe connection instead of the TCP/IP connection, or specify. (stage) as the host name. Use the -- socket option to specify the pipe name. Original article: http://www.cnblogs.com/Leon5/archive/2010/12/07/1899302.html
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.