Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
i am unable to start mysql client in terminal i use the following command to stat mysql client
sudo mysql
and got the following error
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
i use this command to start my server
sudo /opt/lampp/lampp start
please tell what i am doing wrong .
Try mysql -u root -h 127.0.0.1.
For some reason mysql from XAMPP doesn't bind socket.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
In a new MySQL Workbench; while creating a connection It keeps giving me an error :
" Failed to connect to MySql at 127.0.0.1:3306 ; can't connect to MySql server on '127.0.0.1'(10061)
In my case I had a previous mySQL server installation (with non-standard port), and I re-installed to a different directory & port. Then I got the same issue. To resolve, you click on home + add new connection.
If you need to know the port of your server, you can find it when you start My SQL command line client via All Programs -> MySQL -> MySQL ServerX.Y -> MySQL X.Y Command Line Client and run command status (as below)
There is a difference between 127.0.0.1 and localhost. In all likelyhood your user is setup to access the database on "localhost". If that doesn't work, verify the user you're connecting with can access 127.0.0.1 via the CLI ( IE mysql -uroot -p -h127.0.0.1 ).
Its seams your database ie (mysql) not started,
check the mysql official documentation, how to start mysql server.
If you already install the mysql server follow the below process.
[Your mysql server installation directory location]/bin\mysqld" --install
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have the problem of connecting with mysql on my debian server. I run mysql -u root and get the error message:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
So I did and I ran the command sudo find / -type s and got
/run/proftpd.sock
/run/mysqld/mysqld.sock
Not /var/run/mysqld/mysqld.sock!
Im simply trying to set up a database server to test it. What should I do?
This question would be better asked on serverfault.com. However, the easiest way to do this (without confusing other Debian apps) would be to create (as root) a symbolic link to the sock file:
# ln -s /run/mysqld/mysqld.sock /var/run/mysqld/mysqld.sock
Connect with mysql -u root -S /run/mysqld/mysqld.sock, this should work.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
When I try to connect with putty I get 'host is not allowed to connect to this mysql server'. Why is that happening? Host and client are on my machine.
When I connect with the command line it connects.
You need to change how your configuration is set up.
Comment out the skip-networking section within your MySQL config: # skip-networking, if you have skip-networking it will discard any TCP/IP connection which is likely why your failing.
Once you have enabled your TCP/IP connections you will need to grant permission to your user to connect from other machines:
GRANT ALL PRIVILEGES ON *.* TO <username>#'%' IDENTIFIED BY '<password>';
This will let username connect from any machine to your database with the appropriate password.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Every time I restart MySQL server
bitnami#xxx:/$ sudo opt/bitnami/ctlscript.sh start server
WWarning: World-writable config file '/opt/bitnami/mysql/my.cnf' is ignored
Warning: World-writable config file '/opt/bitnami/mysql/my.cnf' is ignored
121120 12:30:18 mysqld_safe Logging to '/opt/bitnami/mysql/data/mysqld.log'.
121120 12:30:18 mysqld_safe Starting mysqld daemon with databases from /opt/bitnami/mysql/data
121120 12:30:20 mysqld_safe mysqld from pid file /opt/bitnami/mysql/data/ip-10-136-14-170.pid ended
/opt/bitnami/mysql/scripts/ctl.sh : mysql could not be started
The server responds with the following error:
(2002, "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)")
Please tell me what I have to do fix this issue.
If mysql is installed as a service (which is most of the time) you can do service mysqld restart or /etc/init.d/mysqld restart.
You can also use start, stop or reload instead of restart.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a server running a web application that uses a mysql database. The database itself is not located on that server -- it's located on another server. The database server is not accessible from my location.
I'd like to use ssh port mapping so I can run mysql on my Mac laptop and connect to the database. I'm assuming this means I need to connect to my web application server using ssh and port forwarding.
It's like this:
My Mac -> Web Server -> Database Server
I'd like to run the mysql command on my macbook pro something like this:
mysql -u dbuser -hlocalhost -p
and then type in the mysql password.
Also, I connect to my web server using ssh keys.
Add this option to your SSH command line:
-L 127.0.0.1:3306:IP_OF_SQL_SERVER:3306
You will have to use 127.0.0.1 in mysql's -h option ("localhost" means using Unix sockets locally), and you might want to disable compression in SSH, while activating it in mysql client with the -C option.