> Configure -- prefix =/myhome/MySQL -- Exec-Prefix =/myhome/MySQL -- With-charset = gb2312
> Make
> Make install
Edit/etc/My. CNF
[Mysqld]
Datadir =/myhome/MySQL/Data
Socket =/tmp/MySQL. Sock
# Default to using old password format for compatibility with MySQL 3.x
# Clients (those using the mysqlclient10 compatibility package ).
Old_passwords = 1
[Mysql. Server]
User = slview
Basedir =/myhome/MySQL
[Mysqld_safe]
Err-log =/myhome/MySQL/log/mysqld. Log
PID-file =/myhome/MySQL/run/mysqld. PID
Lower_case_table_names = 1
Socket =/tmp/MySQL. Sock
Log File
> Mkdir-P/myhome/MySQL/run/mysqld
> Mkdir-P/myhome/MySQL/Data
> Mkdir-P/myhome/MySQL/log
# Initializing a database
>/Myhome/MySQL/bin/mysql_install_db -- user = <username>
Start MySQL
Use slview account:
./Mysqld_safe -- defaults-file =/etc/My. CNF -- user = <username> &
Set the root password
/Myhome/MySQL/bin/mysqladmin-u Root Password 'root321'
Stop MySQL Service
./Mysqladmin-u root-P Shutdown
Remote logon maintenance:
./MySQL-H <ip>-u root-D dbnms-P
Common maintenance commands:
Show databases;
Show tables;
Use <Database Name>