-
user insert 쿼리Data Base/MySQL 2008. 4. 17. 10:38
Enter password: *********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.51a-community-nt MySQL Community Edition (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database mydb;
Query OK, 1 row affected (0.03 sec)mysql> user mydb;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual thatcorresponds to your MySQL server version for the right syntax to use near 'usermydb' at line 1
mysql> use mydb;
Database changed
mysql> select * from use;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual thatcorresponds to your MySQL server version for the right syntax to use near 'use'at line 1
mysql> select * from user;
ERROR 1146 (42S02): Table 'mydb.user' doesn't exist
mysql> insert into user (host,user,password) values('localhost','jsp','jsp123');ERROR 1146 (42S02): Table 'mydb.user' doesn't exist
mysql> use mysql
Database changed
mysql> select * from user;
+-----------+------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
| Host | User | Password | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections |
+-----------+------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
| localhost | root | *ED7EE48813B7E8EAB3EEC4BBFE181FA3ABF9B3C3 | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y| | | | | 0 | 0 | 0 | 0 |
+-----------+------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
1 row in set (0.00 sec)mysql> insert into user values ('localhost','myuser',password('mypasswd'),'N','N','N','N','N','N','N','N','N','N','N','N','N','N');ERROR 1136 (21S01): Column count doesn't match value count at row 1
mysql> insert into user values ('localhost','jsp','password('jsp123'));
'> '
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual thatcorresponds to your MySQL server version for the right syntax to use near 'jsp123'));
'' at line 1
mysql> insert into user values ('localhost','jsp',password('jsp123'));
ERROR 1136 (21S01): Column count doesn't match value count at row 1
mysql> insert into user (host,user,password) values ('localhost','jsp',password'jsp123'));
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual thatcorresponds to your MySQL server version for the right syntax to use near ''jsp123'))' at line 1
mysql> insert into user (host,user,password) values ('localhost','jsp',password('jsp123'));
ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value
mysql> use mysql
Database changed
mysql> insert into user (host,user,password) values ('localhost','jsp',password('jsp123'));
ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value
mysql> select * from db;
Empty set (0.00 sec)mysql> select * from tables_priv;
Empty set (0.00 sec)mysql> grant all *.* to jsp@localhost identified by 'jsp123' with grant option;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual thatcorresponds to your MySQL server version for the right syntax to use near '*.* to jsp@localhost identified by 'jsp123' with grant option' at line 1
mysql> grant all on *.* to jsp@localhost identified by 'jsp123' with grant option;
Query OK, 0 rows affected (0.03 sec)mysql> commit;
Query OK, 0 rows affected (0.00 sec)mysql>
'Data Base > MySQL' 카테고리의 다른 글
게시물 연습중.. (1) 2008.12.30 Mysql Tool (0) 2008.12.30 kimho_board query (0) 2008.04.17 답변 게시판 쿼리 (0) 2008.04.11 회원 테이블 생성 쿼리 (0) 2008.04.11 mysql 을 설치했는데...자꾸 삐삐 거리면서 신경 거스르는 소리가 났지만 해결. (0) 2008.04.10 java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver (0) 2008.03.12