0

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 !

xaos_xv
  • 759
  • 1
  • 10
  • 27

4 Answers4

0

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

UM1979
  • 162
  • 3
  • 15
0

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>@'%'.

elenst
  • 3,839
  • 1
  • 15
  • 22
0

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.

0

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

Pristine Kallio
  • 505
  • 5
  • 19