How to install a MySQL source package

Source: Internet
Author: User

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.

 
 
  1. # Pw groupadd mysql creates a group
  2.  
  3. # Pw useradd-g mysql create a user and add it to the group
  4.  
  5. # Cd/usr/src
  6.  
  7. # Tar zxvf mysql-5.x.xx-freebsdx.x-i386.tar.gz decompress the downloaded source package without installation Layout
  8.  
  9. # Mv mysql-5.x.xx-freebsdx.x-i386/usr/local/mysql move to/usr/local/and renamed mysql
  10.  
  11. # Cd/usr/local/mysql
  12.  
  13. #/Usr/local/mysql/scripts/mysql_install_db-- User=Mysql 
  14.  
  15. # Chown-R root.
  16.  
  17. # Chown-R mysql data
  18.  
  19. # Chgrp-R mysql.
  20.  
  21. #/Usr/local/mysql/bin/mysqld_safe-- User=Mysql&
  22.  
  23. #/Usr/local/mysql/bin // mysqladmin-u root password 'your new password'
  24.  
  25. #/Usr/local/mysql/bin/mysql-u root-p
  26.  
  27. Your new password
  28.  
  29. Mysql># After Entering, the prompt is mysql> 
  30.  
  31. Mysql>Show databases; # view the database
  32.  
  33. Mysql>Drop database test; # Delete the test database
  34.  
  35. Mysql>User mysql;
  36.  
  37. Mysql>Delete from user whereUser=''; # It is strongly recommended to delete empty users.
  38.  
  39. Mysql>Flush privileges; # refresh the permission table so that the change can take effect immediately.
  40.  
  41. Mysql>Quit # exit
  42.  
  43. # 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

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.