Ubuntu 安装Mysql & connector
1. 安装MySql
sudo apt-get install mysql-server
apt-get install mysql-client
sudo apt-get install libmysqlclient-dev
2.安装Mysql.connector
# wget http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-1.0.11.zip
# unzip mysql-connector-python-1.0..zip
# cd mysql-connector-python-1.0.
# python setup.py install
Mac系统在MySQL官网下载DMG安装
安装完后会有一个初始密码提示, 注意截图保存
这个是初始密码
装完后我们来修改密码:
终端输入:
mysql -u root -p
输入上面的密码
修改密码:
set password for 'root'@'localhost' = password('');