Not able to execute mysql commands
Hi,
I am not able to execute any of the mysql commands. Kindly guide me. Code:
[root@HP-UX646UU guest]# service mysqld start |
|
Try reading this https://dev.mysql.com/tech-resources...sql_intro.html
Note that the 'DBA' user in mysql is called 'root' BUT this is nothing to do with the Linux root user; its just an unfortunate (imho) re-use of a well known username. |
First you have to login into the mysql then only you can give the command to create database or else..below is the command
mysql --user=mysqluser --password=mysqlpasswd --database=mysql Please note mysql is the default db name in which you login. then you will be in mysql shell like below mysql> mysql> create database db_name; Query OK, 1 row affected (0.00 sec) then you can logout from mysql and login into newly created database mysql --user=mysqluser --password=mysqlpasswd --database=db_name |
I'd recommend NOT putting the passwd section on the cmd line, as that would be visible to other users via top or ps.
If you skip the passwd bit, the DB will prompt you to enter it and it will be invisible (similar to a Linux login) |
All times are GMT -5. The time now is 05:41 AM. |