Linux _ mysql

Source: Internet
Author: User
Installation of mysql in a Linux environment: prepare.
Preparations for installing mysql in a Linux environment: Installation

========================================================== ================================== Install mysql ========================================================== ========================== Step 1: install mysql database tar-zxvf mysql-standard-4.1.21-pc-linux-gnu-i686.tar.gz www.2cto.com Step 2: Create mysql group groupadd mysql Step 3: create mysql_hongten user and put it into mysql group useradd-g mysql mysql_hongten
Step 4: initialize the database and enter the mysql installation directory cd/home/mysql scripts/mysql_install_db -- user = mysql_hongten

Step 5: modify the owner chown-R root of the current file. note: Click "." Step 6: modify the owner chown-R mysql data www.2cto.com of the data folder.

Step 7: change the user group chgrp-R mysql. note: There is "."

Step 8: start mysql bin/mysqld_safe -- user = mysql_hongten & Step 9: Enter the mysql operation interface cd/home/mysql/bin./mysql-u root-p

Step 10: If you want to access any project, you can access mysql database vi/etc/profile.

After modification, save, exit, and then exit: logout www.2cto.com Step 11: start mysql-u root-p under the/root directory

Now mysql is successfully installed on linux ..... ========================================================== =============================== supplement: backup data and recovery data backup: mysqldump-u root-p password database name> data. bak Note: Enter the lib Directory of the mysql installation directory. my mysql installation path is/home/mysql/lib, for example :. /mysqldump-u root-p linuxdb>/home/mysqldump. bak recovery: mysql-u root-p password database name <data. bak for example: mysql-u root-p linuxdb

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.