我正在尝试使用mysql启动一个新的rails项目,但我遇到了mysql的困难。所以这就是我想要做的......
Rails new name -d mysql
然后我试试这个..
rake db:create
但它给了我以下错误..
#<Mysql2::Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)>
Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "pool"=>5, "username"=>"root", "password"=>nil, "host"=>"localhost", "database"=>"biller_development"}, {:charset=>"utf8", :collation=>"utf8_unicode_ci"}
(If you set the charset manually, make sure you have a matching collation)
#<Mysql2::Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)>
Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "pool"=>5, "username"=>"root", "password"=>nil, "host"=>"localhost", "database"=>"biller_test"}, {:charset=>"utf8", :collation=>"utf8_unicode_ci"}
(If you set the charset manually, make sure you have a matching collation)
然后我试试这个..
mysql -uroot
对于mysql提示符,但它说没有找到命令。我安装了mysql 5.6,我有mysql工作台。我该怎么办?任何帮助将不胜感激..
先谢谢