安装:
>configure --prefix=/myhome/mysql --exec-prefix=/myhome/mysql --with-charset=gb2312
>make
>make install
编辑/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/mysqld.pid
lower_case_table_names=1
socket=/tmp/mysql.sock
log文件:
>mkdir -p /myhome/mysql/run/mysqld
>mkdir -p /myhome/mysql/data
>mkdir -p /myhome/mysql/log
#初始化数据库:
>/myhome/mysql/bin/mysql_install_db --user=<username>
启动mysql。
用slview帐号:
./mysqld_safe --defaults-file=/etc/my.cnf --user=<username> &
设置根的口令:
/myhome/mysql/bin/mysqladmin -u root password 'root321'
停mysql服务:
./mysqladmin -u root -p shutdown
远程登录维护:
./mysql -h <ip> -u root -D dbnms -p
常用维护命令:
show databases;
show tables;
use <database名称>
关于mysql在linux平台下的安装配置就介绍到这里,谢谢大家的支持!
声明: 此文观点不代表本站立场;转载须要保留原文链接;版权疑问请联系我们。