1

I am trying to create a table in mysql Cluster.

When I type this I had this error:

 /usr/local/mysql/mysqlc/bin/mysql -h 127.0.0.1 -P 1186
 -u root

 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) 

Someone has an idea?

Thank you very much.

4 Answers4

1

Why are you trying to access MySQL on port 1186 ? MySQL should be available in port 3306 and NDB_MGMD in port 1186 in case you are using a cluster. Run this to check what port are you using :

$ sudo netstat -atnp | grep LISTEN

If you see 3306 for mysql and 1186 for ndb_mgmd there is no need to specify default port. Then to create a table in a cluster just make sure your cluster is up and running

$ ndb_mgm ndb_mgm>show

Then connect normally to your mysql

$ mysql -u root -p

Hatem
  • 200
  • 1
  • 10
1

First stop the SQL service using command:

sudo service mysql stop

Then use the command:

/usr/bin/mysqld_safe --skip-grant-tables

Before you execute above command make sure that you kill all executing mysqld & mysql_safe processes.

And you can go ahead with the commands you mentioned and gain access.

Esteban Herrera
  • 2,263
  • 2
  • 23
  • 32
0

You can grant the permissions to the another host using this command:-

GRANT ALL ON ​*.*​ to root@'192.168.1.4' IDENTIFIED BY 'your-root-password';

And then, you can check the grant access using this:-

show grants;

You can then start the mysql using this command:-

mysql -h 192.168.1.4 -P3306 -u root 
Chetan chadha
  • 558
  • 1
  • 4
  • 19
0

I am on Linux platform with MySQL NDB 5.7. I am trying to monitor all traffic related to MySQL clustering - between data nodes, management node and sql nodes. To that end, I used netstat to list all open ports listening on my machine before starting MySQL cluster. Then, I started MySQL cluster and ran netstat again. I assumed that the ports that were listening the second time around, but not the first time, were related to MySQL clustering. But there are two problems with this. First, there could be ports opened by other processes between the two netstat runs. Second, MySQL might open other ports after I ran the netstat command the second time.

What is the best way to go about finding all ports being used by MySQL for clustering purposes?

I believe ephemeral ports are picked dynamically, so perhaps if I knew all the MySQL clustering related processes that would be running, I can figure out every port that they are using. Pointers will be very welcome.