How to restart mysql server? [closed] - mysql

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.

Related

Failed to connect to MySql at 127.0.0.1:3306 [closed]

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

Can't seem to connect to mysql [closed]

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.

command line mysql client not opening ubuntu 12.10 [closed]

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.

phpMyAdmin not getting started from Linux CentOS? [closed]

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 installed MySQL server on Linux CentOS server with the command -
sudo yum install mysql
I am able to start the Mysqld service. Then I have installed phpMyAdmin with the command
sudo yum install phpmyadmin
I have changed the config.inc.php file for the configuration. Then I have restarted the httpd service. Also I have changed the iptables to give access to mysql port 3306.
But still I am not able to get started phpMyAdmin on the browser.
Also I didnt set the password for root user but when I connect to mysql through command line it asks for the password. I tried with blank password but it is now working.
So please can anybody suggest me how to start phpMyAdmin and get connected to mysql ?
phpMyAdmin is supposed to works flawlessly, I usually installed from the official website after get installed MySQL and PHP. So, have you installed PHP already?
In negative case, you have to do it before run phpMyAdmin.
sudo yum install php5 php5-mysql
It could be that your SELinux is blocking it. I have seen this before with things I have done where SELinux has stopped me accessing it. Running sestatus will tell you.
To disable it, edit the file /etc/selinux/config so SELINUX is set to disabled. Then restart your server and run sestatus to check.

Another mysqld server running on port 3306 error [closed]

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 installed Mysql 5.1 on Mac OS X 10.7 Lion. For some reason, though, when I try starting the server with the command "mysqld" I get an error in the log file which says:
120328 21:32:40 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
120328 21:32:40 [ERROR] Do you already have another mysqld server running on port: 3306 ?
120328 21:32:40 [ERROR] Aborting
If I run "netstat -nat | grep 3306" in my terminal, I get the following:
tcp4 0 0 *.3306 . LISTEN
UPDATE:
So here's the output for that.
mysqld 24645 sb1752 12u IPv4 0xffffff8010f6bde0 0t0 TCP *:mysql (LISTEN)
This is odd though! Because my mysql server is not started.
When I type "mysql" in command line, it says
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I did install other version of mysql and uninstalled earlier today. Any idea what to do here?
use lsof -i TCP:3306 to check which program binds port 3306
You could use netstat -lp | grep 3306 to find out what program is already listening on port 3306 (you should see PID/Program name in last column) and stop that (maybe mysql is already running?).
Alternatively you could start the newly installed server on a different port. (edit my.cnf and change the default port there)