My lamp implementation process-MySQL

Source: Internet
Author: User

Install MySQL

# Cd/usr/down
Run ls-L to list the files in the current directory.
 
# Groupadd MySQL

# Useradd-G MySQL (if you select "Install all" when installing the toolkit, the commands for adding these two user groups will prompt that the user group already exists)

# Tar-zxvf mysql-5.0.37.tar.gz

# Cd mysql-5.0.37

#./Configure -- prefix =/Server/MySQL -- With-charset = gb2312 -- With-extra-charsets = GBK, gb2312
The prefix parameter specifies the MySQL installation directory. We will install it in the/Server/MySQL directory.

# Make

# Make install

#/Server/MySQL/bin/mysql_install_db -- user = MySQL

# Cp support-files/my-medium.cnf/etc/My. CNF
Copy the MySQL configuration file to the/etc/directory and save it as my. CNF

# Cp support-files/MySQL. Server/etc/rc. d/init. d/mysqld

# Chmod 700/etc/rc. d/init. d/mysqld

# Chkconfig -- add mysqld

# Cd/Server/MySQL
Go to the MySQL installation directory.
And run chown-r root.
Note: Do not miss "."

# Cd Server

# Chmod 750 mysql-R
# Chgrp MySQL mysql-R

# Chown MySQL/var-r // create a var directory to load the error file. If the installation path is -- prefix =/Server/MySQL, query the VaR folder in the MySQL directory, if no installation path is specified, it is installed under/usr/local/by default. var is created here.

#/Server/MySQL/bin/mysqld_safe -- user = MySQL &
Start MySQL

When mysqld ended appears, click "enter" to return to the command line.

# Bin/MySQL-u root-P
Log on to MySQL

The system will prompt you to enter the password. Because the password is not set during installation, the default password is blank. Click Enter to enter.
 

The following prompt indicates that MySQL is installed and can be used.

Welcome to the MySQL monitor. commands end with; or \ G.
Your MySQL connection ID is 65
Server version: 5.0.37-log Source Distribution

Type 'help; 'or' \ H' for help. Type '\ C' to clear the buffer.
 

Now let's test MySQL.
Enter selcet version ();
View MySQL version
Note: The SQL statement must end ";"

Show mysql-5.0.37

Mysql> show character set;
Check whether the GBK and gb2312 fonts are installed. If not, restart./configure & make install.

Quit;

The basic MySQL configuration is complete. to modify the configuration parameters as needed, refer:
Http://www.cnblogs.com/ovliverlin/articles/832648.html

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.