Install mysql using yum in CentOS
Tools/Raw Materials
- Yum Library
- Mysql database
- CentOS6.4 _ 64bit
Method/step
- 1
Check whether the built-in mysql of CentOS is installed.
Input: yumlistinstalled | grepmysql
- 2/5
If you have a built-in mysql, how can you uninstall the built-in mysql database of CentOS?
Input: yum-yremovemysql-libs.x86_64, unmounted sequentially if there are multiple dependency files.
When the result is displayed as Complete! The uninstallation is complete.
- 3/5
View the mysql version information on the yum database (the CentOS system needs to connect to the network normally ).
Input: yumlist | grepmysql or yum-ylistmysql *
- 4/5
Use yum to install the mysql database.
Enter yum-yinstallmysql-servermysqlmysql-devel. The command will install mysql-server, mysql, and mysql-devel. When the result is displayed as "Complete !" Installation is complete.
Note: Installing mysql only installs the database. Only installing mysql-server is equivalent to installing the client.
- 5/5
View the version of the mysql database that you just installed.
Input: rpm-qimysql-server