Unable to access localhost/phpmyadmin - mysql

I've installed a LAMP stack, MySQL-server, apahe2, PHPMyAdmin, but unable to access is using localhost/PHPMyAdmin. I can access MySQL using the terminal. But not through PHPMyAdmin.
I also checked /var/www/html, no PHPMyAdmin folder is present.
I once deleted it by mistake, I think the issue is from there.
This is the output :

Try this In Terminal :
sudo /etc/init.d/apache2 stop
sudo /opt/lampp/lampp start
if it's not working try to change the port of phpmyadmin to 3306 to 3307
Hoping it will be useful

Related

Mysql Database cannot start in XAMPP for Mac

Mysql Database suddenly cannot be start in my Mac. I already tried to run sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start but it show the error ../Applications/XAMPP/xamppfiles/bin/mysql.server: line 264: kill: (9346) - No such process
ERROR!. is there anyone know how to solve it please?. I already tried to sudo killall mysqld but still can't start.
Open Xampp panel, in Mysql databse press configure and change the port from 3306 ->3310 for example and it should work.
Just had a similar issue setting up xampp on MacOS 10.14.X... you can simply run sudo killall mysqld then sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start
For some reason if the above command doesn't work for you!
Try this:
For XAMPP 7.3.31-2, I changed the port number from 3306 to 3307.
Click on Manage Servers
Select MySQL Database
Click on Configure on your right
Change your port number to 3307
Click OK
Close your Control Panel and relaunch it.
You are now good to go.

Can't connect to MySQL server from localhost but MySQL service is running

No matter what I try i keep getting this error:
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061).
This goes for: 1) >mysql 2) >mysql -u root 3) >mysql -u root -p 4) >mysqlshow etc....
Mysql version: 8.0.12.0
OS: Windows 10
So the suggested solution I keep encountering is to enable the mysql service manually, but the mysql80 service is running no problem and the port 3307 (i tried both the default 3306 and 3307) show up in netstat as:
TCP 0.0.0.0:3307 0.0.0.0:0 LISTENING
I don't see anything wrong in my my.ini file either (skip-=networking= is commented out and there is no bind-address line), but just in case here is a link: https://drive.google.com/file/d/1udfXwvl-W7UI3pCissTTBYD0wNnDTBiT/view?usp=sharing.
mysqld -u root --skip-grant-tables
Doesn't do anything at all, no error messages either.
I disabled firewall as well but still no luck.
I've been looking for a solution for days on end now so any help is much appreciated.
EDIT: to clarify I cannot access the sql shell via the command line, because this also gives me ERROR 2003
After stopping firewall restart system and check. Run the cmd as Administrator and check. Please paste the error log for more clarity.
Okay so i finally got it to work, I don't know where the issue was but this is what I did:
1) stop the mysql80 service and delete it with Sc delete MySQ in the cmd
2) Go to Add or remove programs and uninstall anything mysql related
3) remove the mysql folders in Program files, programData and C:\Users\username\AppData\Roaming
4) download sql community installer and when asked if you want to download the latest installer DON'T download it, just use the current one. Previous clean re-installs didn't work until I stopped using this newer installer version.
5) Reinstall everything as before
6) SUCCES!

Installing xampp but phpmyadmin doesn't connect

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

MySQL Workbench error when adding a connection

I'm new to mac and mySQL. I installed mySQL 5.6.14 and mySQLWorkbench 1.6. I turned on mySQL in system preferences.
Then I went into workbench, clicked to add a new connection and filled in the details: host is localhost; username is root; password is empty/nothing. Tested the connection and its all good.
Clicked OK and got this error: Exception caught while processing action from home screen: error calling Python module function WbAdmin.autoDetectLocalInstance.
I also can not access mySQL from the terminal.
I've googled and can't find anything. Has anyone got any ideas of what could be wrong something I could try to fix it.
I've had de same problem. For me the solution:
Check that you have the file /etc/my.cnf
if you don't have sudo cp my-default.cnf on the terminal
Try to put password Virlli$ sudo /usr/local/mysql/bin/mysqladmin -u root password 'password'
Restart Mysql and Workbench
for Mysql :sudo /usr/local/mysql/support-files/mysql.server stop
If you are a mac your default password is root . Same as the username.
I've had the same problem. I solved this issue by getting settings section from main window and then connecting from appeared connection from the main window.

Error #2002 Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2)

I'm running MAMP.
It has been working fine up until yesterday. I haven't been able to find anything that helps so far. But here is my problem:
As the title states I'm receiving the following error:
error #2002 "Can't connect to local MySQL server through socket
'/Applications/MAMP/tmp/mysql/mysql.sock' (2)"
which, I have noticed, seems to be a pretty common error when I search for it.
Anyway, When I cd to tmp/mysql and ls -laxo the only thing that shows up besides the ./ and ../ directories is .dummy (I have no idea what that is, but I have a hunch it's not the source of my problem).
That is where the mysql.sock file is suppose to be located. Does anyone know of a way to fix this. Maybe I need to create the mysql.sock file but I wouldn't know what to put in it.
Test
If you attempt to start MySQL using the full path it should work
/Applications/MAMP/Library/bin/mysql -u root -p
Fix
If that works, then you can set it to work normally by running
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock
Resolution
Now MySQL should work normally
mysql -u root -p
I know this is late, but if ever someone is searching this (as I was tonight, but I found the solution), here's what worked for me:
I opened MAMP and had to click "USE default Apache and MySQL ports". (80 and 3306 instead of 8888 and 8889). That seemed to fix the issue.
Silly solution... But in my case, I didnt start the mysql server. So, look that also!
Mysql server has not started.
mysqld stop
mysql.server start
If you'd rather avoid changing ports through MAMP or options in my.cnf file, it might be useful to try forcing a TCP connection via the following on the command line:
/Applications/MAMP/Library/bin/mysql -h 127.0.0.1 -P 8889 -u root
Remembering to set the port is important if it's anything other than the mysql default of 3306.
The -P parameter allows you to set the port.
MAMP's default port is 8889, but you can verify what yours is set to easily via the MAMP WebStart page while MAMP is running:
http://localhost:8888/MAMP/
It'll look similar to this:
I faced the same problem. When i start MAMP separately, then the problem gone. And issuing following command worked fine.
mysql -u root -p