一,给root用户添加密码
遇到的问题
/usr/local/mysql5/bin/mysqladmin -u root -p password root
Enter password:
/usr/local/mysql5/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
问题2
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
二,通过终端链接seqserver
/usr/local/mysql/bin/mysql -u root -p
三,通过终端启动或关闭mysql
1.sudo/Library/StartupItems/MySQLCOM/MySQLCOM start
2.sudo/Library/StartupItems/MySQLCOM/MySQLCOM stop
sudo/Library/StartupItems/MySQLCOM/MySQLCOM [start |stop | restart]
四,解决方案
卸载,重装。5.7.
cd /usr/local/mysql/bin
./mysql -u root -p
enter password:自动生成的密码输入
进入数据库
SET PASSWORD = PASSWORD('root');
新建数据库
create database cAuth;
完美解决以上问题。
五
mysql -u root -p;
use cAuth;
show tables;
create database test;
select * from cSessionInfo;
建表
create table test(id int,name varchar(100));
查看表
select * from test;
show tables;
desc cSessionInfo;
select create_time,open_id from cSessionInfo;
删除表
show tables;
drop table test;
npm install wafer2-client-sdk --save
npm install sass-loader node-sass -save-dev