Install mysql and ubuntu tumysql
First, check whether mysql is installed in the system.
Enter sudo netstat-tap | grep mysql on the terminal
If no response is received and no result is displayed, the installation is not performed;
The installation command is shown above;
Some simple management of MySQL;
Start mysql service: sudo start mysql
Stop mysql service: sudo stop mysql
Modify the mysql administrator password: sudo mysqladmin-u root password newpassword
Set Remote Access (normally, mysql only listens on 127.0.0.1 when using port 3306. Access from other IP addresses is denied and can be viewed through netstat)
To cancel a local listener, modify the my. cnf file;
Find/-name my. cnf find my. cnf location
Edit my. cnf and comment out bind-address = 127.0.0.1.
Directory structure analysis after MySQL installation (only for online installation using apt-get install)
Database storage directory:/var/lib/mysql/
Related configuration file storage directory:/usr/share/mysql
Related command storage directory:/usr/bin (mysqladmin mysqldump and other commands)
Startup step storage directory:/etc/rc. d/init. d/