Step 0: Install MySQL
Install MySQL before following the workbench. Command is
Yum install MySQL mysql-server mysql-libs mysql-Server
The functions of MySQL packages are as follows:
"MySQLFor the client tools,Mysql-ServerFor the server and associated tools, andMysql-libsFor the libraries. The libraries are required if you want to provide connectivity from different versions and environments such as Perl, Python and others ."
The advantage of using the yum command to install is that it is more convenient, and the disadvantage is that the version installed by the yum command is slightly behind the latest version ......
After terminal prompts complete, it indicates that the installation is complete. The MySQL configuration file is installed/Etc/My. CNF, The MySQL server startup script is installed/Etc/init. d/mysqld
Official notes:
"A sample configuration file is installed/Etc/My. CNF. An init script, to start and stop the server, will have been installed/Etc/init. d/mysqld."
The command to start MySQL server is:
Root-shell> service mysqld start
If you want to automatically start MySQL Server when centos is turned on, you can use the command
Root-shell> chkconfig -- levels 235 mysqld on
After installing MySQL and mysq lserver, you can install workbench.
Step 1: Download the workbench installation file from the MySQL official website.
Http://dev.mysql.com/downloads/mirror.php? Id = 412155
Step 2: After the download is complete, click Install
Double-click the downloaded file to install
The system will prompt the package to be installed. Click Install.
Enter the root password.
Then, it downloads the dependent package.
Step 3: Open Port 3306
Because MySQL uses port 3306 by default, and centos does not enable this port by default, you must first open it. The command is
/Sbin/iptables-I input-P TCP -- dport 3036-J accept
Save settings
/Etc/rc. d/init. d/iptables save
Step 4:Find the installedProgram, Run MySQL workbench
You can see MySQL workbench in application-> programming.
Create a connection
Click store in keychain to save the password
Then, keep OK until the connection is created.
We can see that a new connection is created and double-click to open the connection.
We can see that the entire library is still empty and there is nothing.
In this case, you can create a database or select import.