mysql解压安装,以及单机同时运行多个版本
bin/mysqld --initialize --user=mysql
--basedir=/usr/local/mysql --datadir=/data/mysql
如果失败的话
bin/mysqld --defaults-file=C:\my.ini --initialize
此处需要注意记录生成的临时密码,如上文:YLi>7ecpe;YP
cp my-default.cnf /etc/my.cnf
bin/mysqld_safe --defaults-file=my.cnf
my.cnf
basedir=/home/free/sqls
datadir=/home/free/sqls/data
port=9999
server_id=29922
socket=/home/free/sqls/my.socke
设置默认utf-8
character_set_server=utf8
init_connect='SET NAMES utf8'
mysql --socket=xxxx
set password=password('root');
grant all privileges on *.* to root@'%' identified by 'root';
flush privileges;
grant grant option on *.* to 'root'@'%';
点击评论