Build mysql5.6 service _ MySQL on centos virtual machine in win7

Source: Internet
Author: User
Build the mysql5.6 service CentOSwin7 on the centos virtual machine of win7

Download the bitsCN. com1 installation package

Mysql5.6:

Http://dev.mysql.com/downloads/mysql/

Select the linux version here:

Navicat11 cracked version:

Http://download.csdn.net/detail/can007/6971475

2 mysql installation

Download the rpm64-bit installation package from the official website:

MySQL-5.6.16-1.linux_glibc2.5.x86_64.rpm-bundle.tar,

(1) run the following command:

Tar xvf MySQL-5.6.16-1.linux_glibc2.5.x86_64.rpm-bundle.tar

Decompress the package. the decompressed file directory is:

When you look at the file name, you will know what each package is.

(2) Check whether MySQL is installed in the system. run the following command:

# Rpm-qa | grep mysql

Run the following command to uninstall an installed MySQL instance:

# Rpm-e-nodeps mysql-libs-5.1.61-4.el6.x86_64

Delete all files in the/var/lib/mysql folder.

(3) run the following command to install the Server and Client:

Rpm-ivh MySQL-server-5.6.16-1.linux_glibc2.5.x86_64.rpm

Rpm-ivh MySQL-client-5.6.16-1.linux_glibc2.5.x86_64.rpm

(4) run the following command to view the current mysql status:

Service mysql status

If it is running, the following message is displayed:

(5) If it is not running, run the following command to start it:

Service mysql start

By the way, you can add the startup command to the linux startup item to start the mysql service upon startup. the command is as follows:

Chkconfig -- add mysql

Chkconfig mysql on

Run the command chkconfig-list to view the root permission.

(6) set the root password for mysql by using the following command:

Mysql-u root-p

Enter the password. the initial root password is saved in the '/root/. mysql_secret' file.

EnterMysql> set password = PASSWORD ('20140901 ');

(7) after logging in, run the following command to check the effect:

The following are the three main directories after mysql installation and their functions:

/Var/lib/mysql database file

/Usr/share/mysql command and configuration file

/Usr/bin mysqladmin, mysqldump, and other commands

3 navicat installation

The above mysql is installed on my local vmWare, centOS version of the system, I want to operate mysql on the local win7, you need a graphical client, this is more convenient. Navicat can be used directly. My local machine is 64-bit. if I fail to find the 64-bit cracked version on the Internet, I will get a 32-bit version without affecting the usage.

After downloading the compressed package from your local address, the administrator is limited to run the navicat110_premium_cs_x86.exe file in the package. this is a silly operation. Run the navicat.premium.11.0.6-mpt.exe file. If there is a soft alarm, do not be afraid. this is not a virus. after adding Trust, wait for the words "OK" in the lower right corner of the software to come out, it indicates that the attack was successful.

4. connect win7 to the mysql service on the virtual machine

Create a new database connection in the opened navicat and the connection fails:

So bad!

Check whether the firewall on the local machine and virtual machine is disabled. after confirming that the firewall is disabled, it still cannot be connected. Check the network configuration of the VM:

It is also correct. Think about it and forget that when we started the mysql service, the root user was configured by default, that is, it was only allowed to log on from localhost, connecting to the Server from a remote Client is limited, so after logging on to mysql on linux, run the following command:

This statement is used to grant data access permissions to any host. Check out our navicat client. good!

Over !~~~

BitsCN.com

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.