First create Database and user name in Mysql database wizard in godaddy
--------------------------------------------------------------------------------
=>
1) First go to mysql folder in cmd (directory) in windows
C:> mysqld --console
-> It runs the mysql server
2) open another cmd
-------------------------------------------------------------------------------
1) login with root and enter passwor
-> mysql -u root --password
-> 1234
2)
GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'IP' IDENTIFIED BY 'PASSWORD';
here user name is -> ex(srini_user)
here IP is -> Mysql server IP address ex(166.62.28.109)
3)
-------------------------------------------------------
1)
mysql -u srini_user -p -h 166.62.28.109
------------------------------------------------------------------------------------------
It displays the follwing....
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 20869966
Server version: 5.5.49-cll-lve MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
> mysql
------------------------------------------------------------------------------------
mysql> show databases;
Connection id: 20877375
Current database: *** NONE ***
+--------------------+
| Database |
+--------------------+
| information_schema |
| srini_db |
+--------------------+
2 rows in set (0.71 sec)
---------------------------------------------------
--------------------------------------------------------------------------------
=>
1) First go to mysql folder in cmd (directory) in windows
C:> mysqld --console
-> It runs the mysql server
2) open another cmd
-------------------------------------------------------------------------------
1) login with root and enter passwor
-> mysql -u root --password
-> 1234
2)
GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'IP' IDENTIFIED BY 'PASSWORD';
here user name is -> ex(srini_user)
here IP is -> Mysql server IP address ex(166.62.28.109)
3)
'USERNAME' is the username to be created.
'IP' is the public IP address of the remote connection.
'PASSWORD' is the password to be assigned for this username.
(IP can be replaced with % to allow this user to logon from any host or IP)
'IP' is the public IP address of the remote connection.
'PASSWORD' is the password to be assigned for this username.
(IP can be replaced with % to allow this user to logon from any host or IP)
mysql> FLUSH PRIVILEGES;
mysql> exit;
mysql> exit;
-------------------------------------------------------
1)
mysql -u srini_user -p -h 166.62.28.109
------------------------------------------------------------------------------------------
It displays the follwing....
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 20869966
Server version: 5.5.49-cll-lve MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
> mysql
------------------------------------------------------------------------------------
mysql> show databases;
Connection id: 20877375
Current database: *** NONE ***
+--------------------+
| Database |
+--------------------+
| information_schema |
| srini_db |
+--------------------+
2 rows in set (0.71 sec)
---------------------------------------------------
No comments:
Post a Comment