I am using Linux Ubuntu 14.04 LTS, i installed Mysql Workbench using the Ubuntu software center. Now, i am unable to start the server both when i open a connection or i click on Start Server button.
The server is configured to run on localhost:3306 (the default configuration).
Here is the Mysql Workbench Startup Message Log:
2016-02-28 12:10:27 - Checked server status: Server is stopped.
2016-02-28 12:10:35 - Checked server status: Server is stopped.
2016-02-28 12:10:50 - Starting server...
2016-02-28 12:10:50 - Executting '/etc/init.d/mysqld start'
2016-02-28 12:10:53 - Checked server status: Server is stopped.
2016-02-28 12:10:59 - Could not stop server. Permission denied
2016-02-28 12:10:59 - Checked server status: Server is stopped.
You need to do this with root privileges, so you need the ability to use sudo. You will be prompted for your password when you do this. If you are not allowed, then you have to apply for sudo access.
I think also your actual problem is you don't have mysql server installed. Not too sure what workbench is. If you want to make databases and tables and store information on the server, you need to install mysql server. At the command prompt:
$ sudo apt-get install mysql-server
to install server. Then to run
$ sudo bash
$ service mysql start
or
$ mysqld_safe
Then to find out if it is running
$ service mysql status
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2016-02-28 22:31:48 AEDT; 3min 11s ago
The line saying "Active: ..." is what you are looking for
Related
I just install MySQL 5.7 enterprise version 5.7.1 commercial Client and then Install 5.7.1 commercial server.
I didn't do any thing just restart CentOS 7 VM
when I try to start the service of mysql i got error
1st i Try to start service using
service mysql start
Redirecting to /bin/systemctl start mysql.service
Failed to issue method call: Unit mysql.service failed to load: No such file or directory.
then i try the following command
service mysqld start
Starting mysqld (via systemctl): Job for mysqld.service failed. See 'systemctl status mysqld.service' and 'journalctl -xn' for details. [FAILED].
I unInstall the MySQL and delete the folder where log and data files created and then reinstall MySQL then restart CentOS again same Issue.
Regards,
Saad
I'm using Arch Linux. I've installed mysql by aurget. Then when I'm trying to make some data base I face the error: "Can't connect to local MySql server through socket '/run/mysqld/mysqld.sock' (2)" What should I do to resolve my problem?
In Archlinux, services are not enabled or started automatically after installation (unlike Debian/Ubuntu, for example). According to ArchWiki, after installing the mariadb package you need to run (as root):
mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
systemctl enable mariadb.service
systemctl start mariadb.service
I've resolved my problem. It will be lesson for me. I should just update packages with sudo pacman -Syu and mysql start working.
I'm trying to install ERPNext with their install script provided at github (https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh) on my virtual CentOS 7 server. It has MariaDB 10.x installed and I have to remove it first, before I use the script, otherwise I get an error.
But I don't have a solution for following problem, could you guys help me out?
sudo bash setup_frappe.sh --setup-production
Installing for centos 7 amd64
In case you encounter an error, you can post on https://discuss.frappe.io
Adding centos mariadb repo
Installing packages for centos. This might take time...
Installing wkhtmltopdf
Configuring CentOS services
Starting services
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory")'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
In Cmd try this:
sudo service mysql stop
sudo service mysql start
We have a Jenkins CI server that runs our suite of tests on every commit, triggered by a GitHub hook.
We recently moved the suite of tests from running locally on the Jenkins server to running inside a VirtualBox/Vagrant VM. This is to ensure that the test configuration matches the dev environment. This is an Ubuntu 14.04 guest running on Ubuntu 14.04 host.
After moving to the VM model, PHPUnit occasionally fails with no connection to MySQL. The error is Can't connect to MySQL server on '127.0.0.1'.
This error is intermittent, not easily reproducible. That is, if I trigger a new build on Jenkins, it usually succeeds. However, when the new build is triggered by the GitHub hook, it fails more often than manually triggered builds, and sometimes succeeds.
Here's what I tried:
sudo service mysql restart before running phpunit
sleep 5 between the mysql restart and phpunit
Connecting to localhost and 127.0.0.1 -- When I tried connecting to localhost, I received intermittent errors Can't connect to MySQL server on '/var/run/mysqld/mysqld.sock'.
Here's the full output of the failed build:
sudo service mysql restart
* Stopping MySQL (Percona Server) mysqld
...done.
* Starting MySQL (Percona Server) database server mysqld
...done.
* Checking for corrupt, not cleanly closed and upgrade needing tables.
sleep 5
sudo service mysql status
* /usr/bin/mysqladmin Ver 8.42 Distrib 5.6.23-72.1, for debian-linux-gnu on x86_64
Server version 5.6.23-72.1-log
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/run/mysqld/mysqld.sock
Uptime: 6 sec
Threads: 1 Questions: 111 Slow queries: 0 Opens: 761 Flush tables: 1 Open tables: 754 Queries per second avg: 18.500
phpunit
PHPUnit 4.6.2 by Sebastian Bergmann and contributors.
Configuration read from /vagrant/phpunit.xml
...........EEE.E.............E............................EEEEE.
Time: 8.51 seconds, Memory: 135.25Mb
1) ProcessDatasetsTest::test_process_on_census_fraction
PDOException: SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (111)
I've had intermittent connectivity issues with Mysql on Vagrant, but not precisely related to PHPUnit. Connections were dropping just out of the blue, until I found out there were many boxes running at the same time in virtualbox for the same app. I killed them all, then ran vagrant global-status --purge and I had perfect connections again.
We saw a similar issue on a different Vagrant VM -- Can't connect to MySQL server -- and it turned out to be a memory issue. The VM was out of RAM. This was fixed by adding or increasing a swapfile on the VM:
sudo fallocate -l 1G /swapfile.img
sudo chmod 0600 /swapfile.img
sudo mkswap /swapfile.img
sudo swapon /swapfile.img
Amazon linux AMI and Percona server 5.6 don't appear to be compatible right out of the box. MySQL won't start after successful install.
In Perconas docs it does say that it is supported.
Steps to get to the below:
yum install http://www.percona.com/downloads/percona-release/percona-release-0.0-1.x86_64.rpm
yum install Percona-Server-server-56
Which installs the client + shared 56 libraries as well.
Some more accurate logs.
[root#* ec2-user]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root#* ec2-user]# service mysql restart
ERROR! MySQL (Percona Server) PID file could not be found!
Starting MySQL (Percona Server).......... ERROR! The server quit without updating PID file (/var/lib/mysql/ip-172-30-0-92.pid).
On the most recent Amazon Linux AMI, I was able to start the server after running these commands:
yum install 'perl(Data::Dumper)'
yum reinstall Percona-Server-server-56
If the perl-Data-Dumper package is not installed, mysql_install_db fails to run and perform the initial setup.
The Percona-Server-server-56 package should declare a dependency on perl-Data-Dumper, but you can work around that error (and avoid the reinstall) by installing it first.