Login To InderWeb ! Just Play !

Username:
Password:

UserSubmittedComments

log in mysql from command prompt windows to access database and change passwords grant privialiges

First of all you should know  how you can add users in mysql databases:-

  • Using CREATE USER and/or GRANT commands
  • Inserting a new record into the mysql.user table

First let's see how to use the CREATE USER command:-

     CREATE USER user [IDENTIFIED BY [PASSWORD] 'password']

e.g   

mysql>CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'mypassword';


Once user added in databases you need to provide privileges to that user.You can use like:-

mysql>GRANT
SELECT,INSERT,UPDATE,DELETE ON *.* TO 'myuser'@'localhost';
or mysql>GRANT ALL ON *.* TO 'myuser'@'localhost';


Another way for creating users in mysql is just enter directoly in user table of mysql and make few entries:-


mysql> INSERT INTO user VALUES('localhost','monty',PASSWORD('some_pass'),
'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
or
mysql> INSERT INTO user (Host,User,Password) VALUES('localhost','usename','pass');
mysql> FLUSH PRIVILEGES;


Mysql commands:-
* isamchk - Check and repair of ISAM tables.
* isamlog - Write info about whats in a nisam log file.
* msql2mysql
* my_print_defaults
* myisamchk
* myisamlog
* myisampack
* mysql - text-based client for mysqld, a SQL-based relational database daemon
* mysql_config
* mysql_convert_table_format
* mysql_find_rows
* mysql_fix_privilege_tables
* mysql_install_db
* mysql_setpermission
* mysql_zap - a perl script used to kill processes
* mysqlaccess - Create new users to mysql.
* mysqlbinlog
* mysqlbug
* mysqlcheck
* mysqld_multi - Used for managing several mysqld processes running in different UNIX sockets and TCP/IP ports.
* mysqldump - text-based client for dumping or backing up mysql databases , tables and or data.
* mysqldumpslow
* mysqlhotcopy
* mysqlimport
* mysqlshow - Shows the structure of a mysql database (databases,tables and columns)
* mysqltest
* pack_isam
* perror - used to display a description for a system error code, or an MyISAM/ISAM table handler error code.
* replace - A utility program to replace changes strings in place in files or on the standard input.
* resolve_stack_dump
* resolveip

Popular Tags