Software >> Services >> RDBMS >> MySQL >> What are the commonly used commandsConnecting via mysql client > mysql --host=localhost --user=youruser --password=yourpassword yourdb or (exlude the password value to enter after password prompt) > mysql --host=localhost --user=youruser --password yourdb (no need to delimit values with single quote ' ) or > mysql -uyouruser -pyourpassword yourdb listing tables in a database mysql> use yourdb; mysql> show tables; Creating new user
mysql> create user 'youruser'@'localhost'; mysql> grant all on yourdb.* to 'youruser'@'localhost'; Viewing list of users mysql> use mysql; mysql> show tables; Note the named user exists mysql> describe user; Note the columns in table user mysql > select user, host, password from user; Creating a table CREATE TABLE `joomla_hfp`.`jos_joodb_places` ( Deleting a user TRUNCATE TABLE tablename; or DELETE FROM tablename; Insert new row into a table INSERT INTO `tablename` Note:
|