Mysql6.5二进制安装( 三 )


# These are commonly set, remove the # and set as required.
basedir =/app/mysql
datadir =/mydata
port =3306
server_id =1
socket=/var/lib/mysql/mysql.sock
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
~
"/etc/my.cnf" 28L, 937C written
#添加开机启动服务
[root@localhost mysql]# chkconfig --add mysqld
[root@localhost mysql]# chkconfig --level 2345 mysqld off
[root@localhost mysql]# su - mysql
#重启mysql
[root@localhost mysql]# service mysqld restart
MySQL server PID file could not be found! [FAILED]
Starting MySQL.. [ OK ]
#修改root密码
[root@localhost mysql]# bin/mysqladmin -u root password 'mysql'
-bash-4.1$ mysql -uroot -pmysql
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.6.12 MySQL Community Server (GPL)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql>
【Mysql6.5二进制安装】


推荐阅读