how can help me to connect to external mysql?
system:
cat /etc/gentoo-release
Gentoo Base System release 2.3
mysql -h vpsxxx.ovh.net --port=12000 -u userxxx -p
Enter password:
ERROR 1042 (HY000): Can't get hostname for your address
mysql -h 149.xxx.xx.xx --port=12000 -u userxxx -p
Enter password:
ERROR 1042 (HY000): Can't get hostname for your address
From another system with windows and Debian working this adress perfekt.
Related
I don't know why standard login to mysql fails:
mysql -u davide -p Enter password: "my password" ERROR 2002 (HY000):
Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
I can log in with this command:
mysql -h 127.0.0.1 -u davide -p
I can't login via phpMyadmin too for this reason
I'm trying to connect to a database and I'm getting this error:
ERROR 1130 (HY000): Unknown error 1130
Here is a command which I'm using:
mysql --host HOSTNAME --user MYUSERNAME -p MYDATABASENAME
I'm using Arch Linux. Thanks in advance for the help !
mysql --host HOSTNAME --user MYUSERNAME -p MYDATABASENAME
MYDATABASENAME - Should be Password not DatabaseName..
Syntax:
shell> mysql --host=localhost --user=myname --password=password mydb
shell> mysql -h localhost -u myname -ppassword mydb
Ref: https://dev.mysql.com/doc/refman/5.7/en/connecting.html
ERROR 1130 translates into Host '<hostname/IP>' is not allowed to connect to this MariaDB server, not sure why you see it as unknown error.
It means that there are no users configured with host=<your hostname/IP> on the server where you are connecting to -- that is, there is no user MYUSERNAME#<your hostname/IP>, or even <anything>#<your hostname/IP>, or <anything>#'%'.
Hi this is similar to phpMyAdmin Remote Access
Basically you have to first configure remote access. Here is a link for MariaDB on Arch Linux remote access configuration. https://dominicm.com/install-mysql-mariadb-on-arch-linux/
Edit config locally.
Config file sudo nano /etc/mysql/my.cnf
Grant privilege to table for user
GRANT ALL PRIVILEGES ON databasename.* TO 'dbusername'#'%' IDENTIFIED BY 'dbpassword';
Restart Mysql/MariaDB
Hopefully this helps.
try mysqld --skip-grant-table
Not sure why but it helped my teammate as she reported.
More details here. https://www.howtoforge.com/setting-changing-resetting-mysql-root-passwords
Using MAMP 4.2.1
My bash profile:
export PATH=$PATH:/Applications/MAMP/Library/bin
Things tried and results:
mysql
=>ERROR 1045 (28000): Access denied for user 'jessier'#'localhost' (using password: NO)
mysql -u root -p
=>Enter password: (*mypassword)
=> ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2)
/Applications/MAMP/Library/bin/mysql -u root -p
=>Enter password: (*mypassword)
=> ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2)
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock
(Attempt again using previous commands, same error messages. Restarted terminal, restarted server, tried with servers both on and off to no success. MAMP running fine in /phpmyadmin.)
UPDATE: SOLVED. Removed MAMP and did a fresh install. Once server started, ran:
/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot
Success.
I am trying to remotely connect to my hidden service MySQL DB
mysql -u root -p -h 127.0.0.1 connected
works fine on local host
I am following this tutorial on reddit:
/r/TOR/comments/222bum/running_mysql_as_a_hidden_service/
I have xampp running on Ubuntu and and tor MySQL listens to port 3306 and Apache on 80
I am trying to connect to my DB remotely with command:
proxychains mysql -u root -p -h http://xxxxxxx.onion DBNAME
Getting this error:
ERROR 2003 (HY000): Can't connect to MySQL server on
'http://xxxxxxxxx.onion' (111)
tried this with socat
socat TCP-LISTEN:3308 SOCKS4A:127.0.0.1:xxxxj.onion:3306,socksport=9050
or
socat TCP-LISTEN:3308 SOCKS4A:localhost:xxxxj.onion:3306,socksport=9050
did not work in tor panel it says but only when i try to proxychains mysql -h 127.0.0.1 -u user -p P 33606
Sep 26 18:43:09.000 [warn] Rejecting SOCKS request for anonymous
connection to private address [scrubbed].
thanks for reply but still cant get it to work
root:/var/lib/tor/hidden_service$ proxychains mysql -u user -h TOR.onion database -p
ProxyChains-3.1 (http://proxychains.sf.net)
Enter password:
|DNS-request| TOR.onion
|S-chain|-<>-127.0.0.1:9050-<><>-4.2.2.2:53-<><>-OK`enter code here`
|DNS-response| TOR.onion is 104.239.213.7
|S-chain|-<>-127.0.0.1:9050-<><>-104.239.213.7:3306-<--timeout
ERROR 2003 (HY000): Can't connect to MySQL server on 'TOR.onion' (111)
GRANT ALL ON Databasename.* TO 'user'#'127.0.0.1
getting some error in console phpmyadmin SQL error
i m prety new to this any help is appreicated
mysql workbench works fine on localhost but when trying to add the onion instead of localhost it dosent work:******
Any suggestions thanks
Change your interface to 0.0.0.0 so external connections can happen (bind-address=0.0.0.0 in my.cnf or equivalent)
GRANT access to the external IP in MySQL: GRANT ALL ON <DB>.* TO '<user>'#'<external_ip>';
When I login without specifying host name, I could not login
mysql -u root -p
It displays the message
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)
But if I use hostname, I am able to login
mysql -h 127.0.0.1 -P 3306 -u root -p
It didn't allow, even if I use localhost as my hostname
What is the reason for this?
I would check that mysql is started
service mysqld start