I have just installed MySQL using the installation documentation.
MySQL is installed in the directory /usr/local as indicated in the documentation.
I attempted to start MySQL using the following command on the command line:
/Library/StartupItems/MySQLCOM/MySQLCOM start
Is it normal that I did not receive a message in the terminal that MySQL has started.
Where is the configuration file location (where do I find the root user account)?
After running the MySQL start command, I launched Sequel Pro, but I cannot connect to 127.0.0.1. How can I connect to this? Here is a screenshot of what happens when I attempt to connect:
I would just like to to start mysql and connect a gui client, what am I missing?
you need to be root to start the service.
type sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
MySQL is configured to listen to port 3307 when installed on Yosemite. After you verify that effectively you started the service, change the Port parameter on your Sequel Pro access window and try again.
Related
I'm using xaamp for MySQL DB and I run my server on both cmd and ubuntu subsystem but my ubuntu says
django.db.utils.OperationalError: (2003, 'Can't connect to MySQL server on '127.0.0.1' (111 "Connection refused")')
The reason is SubSystem Ubuntu is in another network layer. So those cannot connect.
Connecting to Windows network applications/servers from Ubuntu in WSL2
WSL2 is actually running on a separate, virtualized, NAT'd network from your Windows host. As such, you need to determine the proper IP address to use for the Windows host in order to connect to it from the WSL2 network.
Assuming a default WSL/Ubuntu installation on a supported Windows release, mDNS is usually the best option.
The mDNS name of your Windows host that you can use from within Ubuntu will look like:
MyComputerName.local
As long as you haven't changed the DNS resolver from the WSL default, that will be the same as what you see when you run hostname in Ubuntu.
You can determine this programmatically by:
Obtaining the hostname in your programming language / environment
Appending .local
For instance, in Bash, to connect to a Windows MySQL server:
Install the MySQL client in Ubuntu:
sudo apt install mysql-client
Connect to Windows MySQL server via "$(hostname).local":
mysql --hostname=$(hostname).local --user=me -p mydb
Reference: https://askubuntu.com/questions/1411512/how-to-connect-local-windows-applications-like-conda-and-mysql-from-ubuntu-on-ws
So I installed xampp on my Linux machine running Ubuntu 14.04LTS. Now all of a sudden turns out when I try to connect to phpmyadmin it refuses to connect. I have already installed mysql separately as well but it doesn't seem to work. Any workaround for this?
The error that I get is :
MySQL said:
Cannot connect: invalid settings.
Connection for controluser as defined in your configuration failed.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
Any reason why this happens and solution to it?
Go to http://localhost/security/ and then click on the link http://localhost/security/xamppsecurity.php.
After that change password for superuser to 'root'.
After that open your http://localhost/phpmyadmin/
As per the comment by RiggsFolly I was running two instances of MySQL
So both mysql servers do end up messing with phpmyadmin and this is how you shutdown the external mysql server while using xampp's inbuilt mysql server to connect successfully using phpmyadmin:
Use whichmysql to find the utility that is running
Navigate to the directory where the external MySQL service is running:
$ cd /usr/bin
$ mysqladmin shutdown
This shuts down the MySQL service running if at all it is running.
$ sudo service mysql stop
This helps as well if at all it will tell you the status of the service if it is already shut down.
Now we need to stop the Xampp mysql server so we navigate to /lampp/bin and again execute the same command to shut mysql server down.
$ cd /opt/lampp/bin
$ mysqladmin shutdown
Simply restart xampp and you should be good to go.
$ sudo /opt/lampp/lampp restart
I just fell into the same error. The solution I used was, stopping all the servers of xampp, exiting the program. Starting and stoping mysql then starting xampp again
Initial procedure before starting xampp:
sudo service mysql stop
sudo /etc/init.d/apache2 stop
If it bring the error as stated in this question, then follow the procedure below.
That is:
sudo /opt/lampp/lampp stop
sudo service mysql start
sudo service mysql stop
sudo /opt/lampp/lampp start
I've installed MySQL using the instructions on nitrous.io using autoparts. Once installed and running, is it possible to use your local MySQL workbench to connect to the MySQL Server installed on that nitrous.io environment?
So you could ssh into your nitrous.io box from your local machine, but can you do the same and connect to MySQL using your local machine? If so, what credentials would you use?
You can use MySQL Workbench and other apps if you establish SSH tunneling with your Nitrous box. Run the following command in your Unix console, replacing the variables with the actual values found on your boxes page:
ssh -N -p <box_port> action#<box_host> -L <local_port>/localhost/<remote_port>
From there you can open up MySQL Workbench and connect to host 127.0.0.1 on port 3306. You will also need to ensure your MySQL database on Nitrous is running. Run parts start mysql to start up the database.
Take a look at the Nitrous.IO guide for a complete walkthrough.
I have successfully installed MySQL using Homebrew. However, whenever I type the command mysql I receive this error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I suspect this is a permission problem, as I have confirmed my system is looking for MySQL in the right location. However, I a novice with Unix(OSX) and don't know how to rectify the problem.
I am using OSX 10.7 (Lion)
which mysql produces /usr/local/bin/mysql
When you type 'mysql' you are running the MySQL client. The client needs to communicate with the server. If you simply run 'mysql' without any argument it assumes you are trying to connect to a mysql server that is located on 'localhost' using the user name as the user you are running the command as and without a password.
From the error it seems your server is not running yet. Start it by typing:
mysql.server start
Yesterday I ran 'sudo port install mysql5' and MacPorts installed it perfectly, but then I couldn't run 'mysql' or 'mysqlstart' (I created the proper aliases for that). The error that appears each time is:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/local/var/run/mysql5/mysqld.sock' (2)
The MacPorts mysql5 port only includes the client libraries for MySQL. If you also want to run a local MySQL server, you should install the server port as well:
$ sudo port install mysql5-server
Check to see if the mysql daemon listener is running and listening on port 3306. If not, perhaps all you have to do is start it up.