Hey, recently a little idle, re-installed MySQL to learn.
-----Blog Park-Bang Bang sauce good
System environment:
1. The host is a Windows system with SQLyog installed.
2. The host also installed a virtual machine, the system is centos6.4, the inside installed mysql5.0.95.
Connection steps:
1. Open the virtual machine's CentOS system and log in to MySQL to start the MySQL service.
The landing method is probably as follows:
[Email protected] ~]# Mysql-uroot-Penter Password:welcome to the MySQL Monitor. Commands End With; or \g.your MySQL connection ID is 9Server Version:5.0. the-Log Source distributioncopyright (c) -, ., Oracle and/or its affiliates. All rights reserved. Oracle isA registered trademark of Oracle Corporation and/or Itsaffiliates. Other names trademarks of their respectiveowners. Type'Help ;'Or'\h' forHelp. Type'\c'To clear the current input statement.mysql>
The impression can be set certain files, so that it is scheduled to start every day, without careful understanding, will not elaborate.
2. Check the "User" table of the database "MySQL" to see if the root host is set correctly.
mysql> use mysqldatabase changedmysqlSelect from user; +---------+-------------------------------------------+------+| User | password | host |+---------+-------------------------------------------+------+| Root | * 23ae809ddacaf96af0fd78ed04b6a265e05aa257 | % 123 |% | +---------+-------------------------------------------+------+2 inch Set (0.00 sec) MySQL
Attention:
(1) The host of root in the above is already%, meaning that all the different hosts can connect to MySQL here, remember to set the table content, and then enter the:mysql> FLUSH privileges command under the UPDATE statement to update the table contents, Otherwise SQLyog is not aware of the changes in the database.
(2) In fact, the percentage is not safe, in theory can be set to host Win7 system IP address, so that only the machine can connect it, but I tried, found can not even on, prompted as follows, I also do not understand.
(3) host cannot be set to localhost here because the IP address of the host is not the same as the IP address of the system in the virtual machine. You can use the Ifconfig command to view the IP address of the CentOS system, where my CentOS system IP address is: 192.168.254.129.
[[Email protected] ~]# ifconfigeth0 Link encap:ethernet HWaddrxx: 0C: in: Fe:de: Genevainet Addr:192.168.254.129Bcast:192.168.254.255Mask:255.255.255.0Inet6 addr:fe80::20c:29ff:fefe:de02/ -scope:link up broadcast RUNNING multicast MTU: theMetric:1RX Packets:21330Errors0Dropped0Overruns:0Frame0TX Packets:12326Errors0Dropped0Overruns:0Carrier0Collisions:0Txqueuelen: +RX Bytes:28364229(27.0MiB) TX Bytes:757142(739.3KiB) Interrupt: +Base Address:0x2024lo Link encap:local Loopback inet addr:127.0.0.1Mask:255.0.0.0Inet6 Addr: ::1/ -scope:host up LOOPBACK RUNNING MTU:16436Metric:1RX Packets: AErrors0Dropped0Overruns:0Frame0TX Packets: AErrors0Dropped0Overruns:0Carrier0Collisions:0Txqueuelen:0RX Bytes:720(720.0b) TX Bytes:720(720.0b
(4) If the host is set to localhost, it is because MySQL and SQLyog are installed on the same system, so it is OK.
3. Create a new connection in SQLyog
Attention:
(1) Saved connects is the connection name you set, you can set it freely.
(2) MySQL host address is the IP address of the MySQL to be connected, if MySQL and SQLyog installed on the same system, it can be written as: localhost.
(3) Enter the username and password to log in to MySQL.
(4) Other information is available by default.
4. Click Connect and if successful, you can see the following database structure:
Compare the name of the database that you see after the connection is visible, the same as the database name on the server ~ ~ ~
Connect Linux-mysql with Windows-sqlyog