Mysql installation and configuration tutorial in Ubuntu 14.04 and 14.04 installation and configuration tutorial
Mysql is an open-source Relational Database Management System of Oracle. It is widely used in various small and medium websites and is a cross-platform database management system, now we will introduce how to install and configure mysql on Ubuntu 14.04.
Method/step
1. Update the source list
Open the terminal window and enter "sudo apt-get update" --> press enter --> "enter the password of the root user" --> press Enter. If you do not run this command and install mysql directly, an error message "you can run apt-get update ------" appears, causing installation failure.
2. Install mysql
Open the terminal window ", enter "sudo apt-get install mysql-server mysql-client" --> press enter --> enter "y" --> press enter --> in the "package Settings dialog box", enter mysql as "root ""user's password --> press enter --> re-enter the password --> press enter, installation is complete.
3. How to determine whether mysql is successfully installed
Open the terminal window and enter "sudo service mysql restart" --> press enter --> If mysql is started successfully and is running, mysql is installed successfully.
4. Enable apache to support mysql
Open the terminal window, enter sudo apt-get install libapache2-mod-auth-mysql --> press enter --> Installation successful, after this module is installed, apache can support mysql.
5. Let php support mysql
Open the terminal window, enter sudo apt-get install php5-mysql --> press enter --> Installation successful, after installing this module, php can support mysql.
6. log on to mysql
Open the terminal window and enter mysql-u root-p. --> press enter --> enter the password of the "root" user in mysql --> press enter --> log on successfully.
Add moreUbuntu14.04 how to uninstall mysql?
1. Delete mysql Data Files
Sudo rm/var/lib/mysql/-R
2. Delete the mqsql configuration file:
Sudo rm/etc/mysql/-R
3. Automatically uninstall the mysql program:
Sudo apt-get autoremove mysql * -- purge
Sudo apt-get remove apparmor
The above are the detailed steps for installing and configuring mysql on Ubuntu 14.04. Do you like it?