Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.87 KB | None | 0 0
  1. antoine@PC-Antoine:~$ mysql -u root -p Azerty67 -h local
  2. Enter password:
  3. ERROR 2005 (HY000): Unknown MySQL server host 'local' (0)
  4. antoine@PC-Antoine:~$ mysql -u root -p Azerty67 -h
  5. mysql: [ERROR] mysql: option '-h' requires an argument
  6. antoine@PC-Antoine:~$ mysql -u root -p Azerty67
  7. Enter password:
  8. ERROR 1049 (42000): Unknown database 'Azerty67'
  9. antoine@PC-Antoine:~$ mysql -u root -p
  10. Enter password:
  11. Welcome to the MySQL monitor. Commands end with ; or \g.
  12. Your MySQL connection id is 5
  13. Server version: 5.7.17-0ubuntu0.16.04.1 (Ubuntu)
  14.  
  15. Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
  16.  
  17. Oracle is a registered trademark of Oracle Corporation and/or its
  18. affiliates. Other names may be trademarks of their respective
  19. owners.
  20.  
  21. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  22.  
  23. mysql> CREATE DATABASE Eleves WCS;
  24. ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WCS' at line 1
  25. mysql> CREATE DATABASE Eleves_WCS;
  26. Query OK, 1 row affected (0.00 sec)
  27.  
  28. mysql> CREATE TABLE lste_eleve (
  29. ->
  30. [1]+ Stopped mysql -u root -p
  31. antoine@PC-Antoine:~$ mysql -u root -p
  32. Enter password:
  33. Welcome to the MySQL monitor. Commands end with ; or \g.
  34. Your MySQL connection id is 6
  35. Server version: 5.7.17-0ubuntu0.16.04.1 (Ubuntu)
  36.  
  37. Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
  38.  
  39. Oracle is a registered trademark of Oracle Corporation and/or its
  40. affiliates. Other names may be trademarks of their respective
  41. owners.
  42.  
  43. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  44.  
  45. mysql> USE Eleves_WCS
  46. Database changed
  47. mysql> CREATE TABLE liste_eleves (
  48. -> Nom VARCHAR(100),
  49. -> Prénom VARCHAR(100),
  50. -> Age int,
  51. -> Lieu de résidence VARCHAR(100),
  52. -> );
  53. ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'de résidence VARCHAR(100),
  54.  
  55. )' at line 6
  56. mysql> CREATE TABLE liste_eleves ( Nom VARCHAR(100), Prénom VARCHAR(100), Age int, Lieu de résidence VARCHAR(100));
  57. ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'de résidence VARCHAR(100))' at line 1
  58. mysql> CREATE TABLE liste_eleves ( Nom VARCHAR(100), Prénom VARCHAR(100), Age int, Lieu de résidence VARCHAR(100),);
  59. ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'de résidence VARCHAR(100),)' at line 1
  60. mysql> CREATE TABLE liste_eleves ( Nom VARCHAR(100), Prénom VARCHAR(100), Age int, Lieu de résidence VARCHAR(100) );
  61. ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'de résidence VARCHAR(100) )' at line 1
  62. mysql> CREATE TABLE liste_eleves ( Nom VARCHAR(100), Prenom VARCHAR(100), Age INT, Lieu_de_residence VARCHAR(100) );
  63. Query OK, 0 rows affected (1.32 sec)
  64.  
  65. mysql> DROP TABLE
  66. -> DROP TABLE Eleves_WCS;
  67. ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DROP TABLE Eleves_WCS' at line 2
  68. mysql> DROP TABLE DROP TABLE Eleve_WCS;
  69. ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DROP TABLE Eleve_WCS' at line 1
  70. mysql> DROP TABLE Eleves_WCS;
  71. ERROR 1051 (42S02): Unknown table 'Eleves_WCS.Eleves_WCS'
  72. mysql> DROP TABLE Eleves_WCS;
  73. ERROR 1051 (42S02): Unknown table 'Eleves_WCS.Eleves_WCS'
  74. mysql> DESCRIBE Eleves_WCS
  75. -> DESCRIBE Eleves_WCS;
  76. ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DESCRIBE Eleves_WCS' at line 2
  77. mysql> DESCRIBE Eleves_WCS;
  78. ERROR 1146 (42S02): Table 'Eleves_WCS.Eleves_WCS' doesn't exist
  79. mysql> CREATE TABLE Eleves_WCS;
  80. ERROR 1113 (42000): A table must have at least 1 column
  81. mysql> CREATE TABLE Eleves_WCS (
  82. -> CREATE TABLE liste_eleves ( Nom VARCHAR(100), Prenom VARCHAR(100), Age INT, Lieu_de_residence VARCHAR(100) );^C^E^Z
  83. [2]+ Stopped mysql -u root -p
  84. antoine@PC-Antoine:~$ mysql -u root -p
  85. Enter password:
  86. Welcome to the MySQL monitor. Commands end with ; or \g.
  87. Your MySQL connection id is 7
  88. Server version: 5.7.17-0ubuntu0.16.04.1 (Ubuntu)
  89.  
  90. Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
  91.  
  92. Oracle is a registered trademark of Oracle Corporation and/or its
  93. affiliates. Other names may be trademarks of their respective
  94. owners.
  95.  
  96. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  97.  
  98. mysql> USE Eleves_WCS;
  99. Reading table information for completion of table and column names
  100. You can turn off this feature to get a quicker startup with -A
  101.  
  102. Database changed
  103. mysql> CREATE TABLE liste_eleves (
  104. -> Nom VARCHAR(100),
  105. -> Prenom VARCHAR(100),
  106. -> Age INT,
  107. -> Lieu_de_residence VARCHAR(100) );
  108. ERROR 1050 (42S01): Table 'liste_eleves' already exists
  109. mysql> DROP TABLE liste_eleves;
  110. Query OK, 0 rows affected (0.18 sec)
  111.  
  112. mysql> CREATE TABLE liste_eleves ( ID INT PRIMARY KEY NOT NULL Nom VARCHAR(100), Prenom VARCHAR(100), Age INT, Lieu_de_residence VARCHAR(100) );
  113. ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Nom VARCHAR(100), Prenom VARCHAR(100), Age INT, Lieu_de_residence VARCHAR(100) )' at line 1
  114. mysql> CREATE TABLE liste_eleves ( ID INT PRIMARY KEY NOT NULL, Nom VARCHAR(100), Prenom VARCHAR(100), Age INT, Lieu_de_residence VARCHAR(100) );
  115. Query OK, 0 rows affected (0.34 sec)
  116.  
  117. mysql> DESCRIBE liste_eleves
  118. -> ;
  119. +-------------------+--------------+------+-----+---------+-------+
  120. | Field | Type | Null | Key | Default | Extra |
  121. +-------------------+--------------+------+-----+---------+-------+
  122. | ID | int(11) | NO | PRI | NULL | |
  123. | Nom | varchar(100) | YES | | NULL | |
  124. | Prenom | varchar(100) | YES | | NULL | |
  125. | Age | int(11) | YES | | NULL | |
  126. | Lieu_de_residence | varchar(100) | YES | | NULL | |
  127. +-------------------+--------------+------+-----+---------+-------+
  128. 5 rows in set (0.00 sec)
  129.  
  130. mysql> INSERT INTO liste_eleves
  131. -> SELECT Nom
  132. -> FROM Eleves_WCS
  133. ->
  134. [3]+ Stopped mysql -u root -p
  135. antoine@PC-Antoine:~$ mysql -u root -p
  136. Enter password:
  137. Welcome to the MySQL monitor. Commands end with ; or \g.
  138. Your MySQL connection id is 8
  139. Server version: 5.7.17-0ubuntu0.16.04.1 (Ubuntu)
  140.  
  141. Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
  142.  
  143. Oracle is a registered trademark of Oracle Corporation and/or its
  144. affiliates. Other names may be trademarks of their respective
  145. owners.
  146.  
  147. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  148.  
  149. mysql> USE Eleves_WCS
  150. Reading table information for completion of table and column names
  151. You can turn off this feature to get a quicker startup with -A
  152.  
  153. Database changed
  154. mysql> DESCRIBE liste_eleves
  155. -> ;
  156. +-------------------+--------------+------+-----+---------+-------+
  157. | Field | Type | Null | Key | Default | Extra |
  158. +-------------------+--------------+------+-----+---------+-------+
  159. | ID | int(11) | NO | PRI | NULL | |
  160. | Nom | varchar(100) | YES | | NULL | |
  161. | Prenom | varchar(100) | YES | | NULL | |
  162. | Age | int(11) | YES | | NULL | |
  163. | Lieu_de_residence | varchar(100) | YES | | NULL | |
  164. +-------------------+--------------+------+-----+---------+-------+
  165. 5 rows in set (0.00 sec)
  166.  
  167. mysql> SELECT *
  168. -> ;
  169. ERROR 1096 (HY000): No tables used
  170. mysql> INSERT INTO liste_eleves
  171. -> SELECT *
  172. -> FROM;
  173. ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3
  174. mysql> INSERT INTO liste_eleves VALUES ('THOMIRE', 'Antoine', 21, 'Bordeaux');
  175. ERROR 1136 (21S01): Column count doesn't match value count at row 1
  176. mysql> INSERT INTO liste_eleves ('Nom', 'Prenom', 'Age', 'Lieu_de_residence') VALUES ('THOMIRE', 'Antoine', 21, 'Bordeaux');
  177. ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Nom', 'Prenom', 'Age', 'Lieu_de_residence') VALUES ('THOMIRE', 'Antoine', 21, '' at line 1
  178. mysql> INSERT INTO liste_eleves ('Nom', 'Prenom', Age, 'Lieu_de_residence') VALUES ('THOMIRE', 'Antoine', 21, 'Bordeaux');
  179. ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Nom', 'Prenom', Age, 'Lieu_de_residence') VALUES ('THOMIRE', 'Antoine', 21, 'Bo' at line 1
  180. mysql> INSERT INTO liste_eleves (Nom, Prenom, Age, Lieu_de_residence) VALUES ('THOMIRE', 'Antoine', 21, 'Bordeaux');
  181. ERROR 1364 (HY000): Field 'ID' doesn't have a default value
  182. mysql> INSERT INTO liste_eleves (ID, Nom, Prenom, Age, Lieu_de_residence) VALUES (1, 'THOMIRE', 'Antoine', 21, 'Bordeaux');
  183. Query OK, 1 row affected (0.05 sec)
  184.  
  185. mysql> DESCRIBE liste_eleves
  186. -> ;
  187. +-------------------+--------------+------+-----+---------+-------+
  188. | Field | Type | Null | Key | Default | Extra |
  189. +-------------------+--------------+------+-----+---------+-------+
  190. | ID | int(11) | NO | PRI | NULL | |
  191. | Nom | varchar(100) | YES | | NULL | |
  192. | Prenom | varchar(100) | YES | | NULL | |
  193. | Age | int(11) | YES | | NULL | |
  194. | Lieu_de_residence | varchar(100) | YES | | NULL | |
  195. +-------------------+--------------+------+-----+---------+-------+
  196. 5 rows in set (0.00 sec)
  197.  
  198. mysql> INSERT INTO liste_eleves (Nom, Prenom, Age, Lieu_de_residence) VALUES ('VIGEANT', 'Alexandre', 19, 'Canejan');
  199. ERROR 1364 (HY000): Field 'ID' doesn't have a default value
  200. mysql> INSERT INTO liste_eleves (ID, Nom, Prenom, Age, Lieu_de_residence) VALUES (2, 'VIGEANT', 'Alexandre', 19, 'Canejan');
  201. Query OK, 1 row affected (0.08 sec)
  202.  
  203. mysql> INSERT INTO liste_eleves (ID, Nom, Prenom, Age, Lieu_de_residence) VALUES (3, 'TIMAHIEU', 'Rebecca', 21, 'Le_Lardin');
  204. Query OK, 1 row affected (0.07 sec)
  205.  
  206. mysql> INSERT INTO liste_eleves (ID, Nom, Prenom, Age, Lieu_de_residence) VALUES (4, 'GOOGLE', 'IsYourFriend', 18, 'Moutain_View');
  207. Query OK, 1 row affected (0.20 sec)
  208.  
  209. mysql> INSERT INTO liste_eleves (ID, Nom, Prenom, Age, Lieu_de_residence) VALUES (5, 'Gami', 'Laurie', 23, 'Montcuq');
  210. Query OK, 1 row affected (0.12 sec)
  211.  
  212. mysql>quit
  213. bye
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement