我使用macports安装Mysql5。但是,当我尝试为root帐户创建密码时,我得到了这个错误:
sh-3.2# /opt/local/lib/mysql5/bin/mysqladmin -u root password 123456
/opt/local/lib/mysql5/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/opt/local/var/run/mys
我先安装了Macports,这样就更容易了。然后安装mysql5、mysql5-server和py26-mysql。
一切都很顺利。当我输入:which mysql5时,它返回`/opt/local/bin/mysql5
但是当我尝试进入服务器: mysql5时,生成了一个错误:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/local/var/run/mysql5/mysqld.sock' (2)
我该如何修复它?
我最终希望使用mysql作为django项目的
当我试图从PrefPane启动MySQL时,它会询问我的密码,然后一直显示MySQL服务器有红色的stopped。
启动不了。
$ mysqladmin start
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: '
我在Mac上,刚刚用MacPorts安装了mysql5。
然后我成功地运行了:
sudo /opt/local/lib/mysql5/bin/mysql_install_db --user=mysql
我可以启动服务器并以“root”身份连接,但是我不能创建任何数据库。
$ mysql5 -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.61 Source distribut
我无法在MacOSX10.4.11上启动MySQL服务器。MySQL是使用Macports安装的。MySQL一直运行良好,直到它突然死亡,没有任何明显的原因。
当运行"mysql“时,我会收到错误消息:
ERROR 2002 (HY000): Can't connect to local MySQL server through
socket '/opt/local/var/run/mysql5/mysqld.sock' (2)
如果我尝试手动启动MySQL,将得到以下错误消息:
sudo /opt/local/share/mysql5/mysql/mysql
我无法在Mac 10.4.11上启动MySQL服务器。MySQL是使用Macports安装的。MySQL运行得很好,直到它突然死了,没有任何明显的原因。
当运行"mysql“时,我得到错误信息:
ERROR 2002 (HY000): Can't connect to local MySQL server through
socket '/opt/local/var/run/mysql5/mysqld.sock' (2)
如果我尝试手动启动MySQL,则会收到以下错误消息:
sudo /opt/local/share/mysql5/mysql/mysql
最近,我将我的Mac升级为Mini,并使用迁移助手将我的所有文件和应用程序跨到Mini。
我还重新安装了macport,配置了apache等,所以我设法让本地主机和php在新机器上工作。
但是我现在不能从终端启动mysql了吗?
当我试着平常的时候:
mysql5 -u root -p;
并得到以下错误:
Error: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/local/var/run/mysql5/mysqld.sock' (2)
我还尝试重新启动mys
在我的系统中,mysql.sock的位置是mysql.sock
thrilllap-2:tmp reuven$ mysqld --print-defaults
mysqld would have been started with the following arguments:
--socket=/usr/local/mysql5/mysqld.sock --port=3306
当我尝试通过烧瓶中的sqlalchemy使用mysql时,我得到:
File "build/bdist.macosx-10.6-intel/egg/MySQLdb/connections.py"
昨天我运行了'sudo port install mysql5‘,MacPorts完美地安装了它,但是我无法运行'mysql’或'mysqlstart‘(我为它创建了正确的别名)。每次出现的错误是:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/local/var/run/mysql5/mysqld.sock' (2)
我在终端中运行了以下命令:
sudo port install py26-mysql
sudo port install mysql5-server
它似乎已经正确下载和安装,但当我尝试使用/opt/local/lib/mysql5/bin/mysql打开mysql时,我得到了以下错误:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/local/var/run/mysql5/mysqld.sock' (2)
有人知道哪里出了问题吗?
我安装了unixODBC和MySql ODBC驱动程序,但是无法连接ODBC DNS。
isql -v myodbc_mysql_dsn
我得到了这个错误:
Cannot connect to ODBC DSN:
[SQL ERROR]:[IM002][0][[unixODBC][Driver Manager]Data source name not found, and no default driver specified]|
我的配置如下所示:
cat /etc/odbc.ini
[myodbc_mysql_dsn]
Description = test
Driver = My