Many people have mentioned the problem of installing the MySQL source code package. The following describes how to install the MySQL source code package. If you have encountered any problems in installing the MySQL source code package, take a look.
- # Pw groupadd mysql creates a group
-
- # Pw useradd-g mysql create a user and add it to the group
-
- # Cd/usr/src
-
- # Tar zxvf mysql-5.x.xx-freebsdx.x-i386.tar.gz decompress the downloaded source package without installation Layout
-
- # Mv mysql-5.x.xx-freebsdx.x-i386/usr/local/mysql move to/usr/local/and renamed mysql
-
- # Cd/usr/local/mysql
-
- #/Usr/local/mysql/scripts/mysql_install_db-- User=Mysql
-
- # Chown-R root.
-
- # Chown-R mysql data
-
- # Chgrp-R mysql.
-
- #/Usr/local/mysql/bin/mysqld_safe-- User=Mysql&
-
- #/Usr/local/mysql/bin // mysqladmin-u root password 'your new password'
-
- #/Usr/local/mysql/bin/mysql-u root-p
-
- Your new password
-
- Mysql># After Entering, the prompt is mysql>
-
- Mysql>Show databases; # view the database
-
- Mysql>Drop database test; # Delete the test database
-
- Mysql>User mysql;
-
- Mysql>Delete from user whereUser=''; # It is strongly recommended to delete empty users.
-
- Mysql>Flush privileges; # refresh the permission table so that the change can take effect immediately.
-
- Mysql>Quit # exit
-
- # Echo '/usr/local/mysql/bin/mysqld_safe &'>>/Etc/rc. local
The above is how to install the MySQL source package.
Back up data based on Mysql tables
How to solve the problem of table structure replication in MySQL
How to clear a table in Mysql
Seven Mysql table types
MySQL connection query Overview