Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Setting environment for using XAMPP for Windows.
- nelly@NELLYIVANOVA c:\xampp
- # mysql -uroot;
- ERROR 1045 (28000): Access denied for user 'root;'@'localhost' (using password: NO)
- nelly@NELLYIVANOVA c:\xampp
- # mysql -uroot
- Welcome to the MariaDB monitor. Commands end with ; or \g.
- Your MariaDB connection id is 18
- Server version: 10.4.21-MariaDB mariadb.org binary distribution
- Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
- Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
- MariaDB [(none)]> show databases;
- +--------------------+
- | Database |
- +--------------------+
- | clients2610 |
- | information_schema |
- | mysql |
- | performance_schema |
- | phpmyadmin |
- | reservations |
- | shoot |
- | test |
- | uni |
- +--------------------+
- 9 rows in set (0.017 sec)
- MariaDB [(none)]> use reservations;
- Database changed
- MariaDB [reservations]> show tables
- -> ;
- +------------------------+
- | Tables_in_reservations |
- +------------------------+
- | agency |
- | clients |
- | res |
- +------------------------+
- 3 rows in set (0.008 sec)
- MariaDB [reservations]> INSERT INTO Agency(name, city, country, telnum) VALUES(ivan geshev, Sofia, Bulgaria, 0888888888);
- ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'geshev, Sofia, Bulgaria, 0888888888)' at line 1
- MariaDB [reservations]>
- MariaDB [reservations]> INSERT INTO Agency(name, city, country, telnum) VALUES("ivan geshev", "Sofia", "Bulgaria", "0888888888");
- Query OK, 1 row affected (0.025 sec)
- MariaDB [reservations]> INSERT INTO Agency(name, city, country, telnum) VALUES("boiko borisov", "Sofia", "Bulgaria", "0888888889");
- Query OK, 1 row affected (0.007 sec)
- MariaDB [reservations]> INSERT INTO Agency(name, city, country, telnum) VALUES("toma bikov", "Sofia", "Bulgaria", "0888888899");
- Query OK, 1 row affected (0.007 sec)
- MariaDB [reservations]> desc agency
- -> ;
- +---------+--------------+------+-----+---------+-------+
- | Field | Type | Null | Key | Default | Extra |
- +---------+--------------+------+-----+---------+-------+
- | name | varchar(100) | NO | | NULL | |
- | city | varchar(100) | NO | | NULL | |
- | country | varchar(100) | NO | | NULL | |
- | telnum | varchar(10) | NO | | NULL | |
- +---------+--------------+------+-----+---------+-------+
- 4 rows in set (0.014 sec)
- MariaDB [reservations]> select * from agency;
- +---------------+--------------+----------+------------+
- | name | city | country | telnum |
- +---------------+--------------+----------+------------+
- | Nelly | Radnevo | Bulgaria | 0894080007 |
- | Gaby | Stara Zagora | Bulgaria | 0888693322 |
- | ivan geshev | Sofia | Bulgaria | 0888888888 |
- | boiko borisov | Sofia | Bulgaria | 0888888889 |
- | toma bikov | Sofia | Bulgaria | 0888888899 |
- +---------------+--------------+----------+------------+
- 5 rows in set (0.006 sec)
- MariaDB [reservations]> INSERT INTO Agency(name, city, country, telnum) VALUES("NewAgency", "Sofia", "Bulgaria", "0281931221");
- Query OK, 1 row affected (0.003 sec)
- MariaDB [reservations]> INSERT INTO Agency(name, city, country, telnum) VALUES("AgencyNew", "Sofia", "Bulgaria", "0281931222");
- Query OK, 1 row affected (0.008 sec)
- MariaDB [reservations]> INSERT INTO Agency(name, city, country, telnum) VALUES("AgencyNovel", "Paris", "NULL", "0281931222");
- Query OK, 1 row affected (0.008 sec)
- MariaDB [reservations]>
- MariaDB [reservations]> INSERT INTO Client(egn, name, telnum, email)) VALUES("7702031111", "Ivan Ivanov", "022121232", "ivanov@mymail.bg");
- ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') VALUES("7702031111", "Ivan Ivanov", "022121232", "ivanov@mymail.bg")' at line 1
- MariaDB [reservations]> INSERT INTO Client(egn, name, telnum, email)VALUES("7702031111", "Ivan Ivanov", "022121232", "ivanov@mymail.bg");
- ERROR 1146 (42S02): Table 'reservations.client' doesn't exist
- MariaDB [reservations]> INSERT INTO Clients(egn, name, telnum, email)VALUES("7702031111", "Ivan Ivanov", "022121232", "ivanov@mymail.bg");
- Query OK, 1 row affected (0.011 sec)
- MariaDB [reservations]> UPDATE acency
- -> SET country = "France"
- -> WHERE name = "AgencyNovel";
- ERROR 1146 (42S02): Table 'reservations.acency' doesn't exist
- MariaDB [reservations]> UPDATE agency
- -> SET country = "France"
- -> WHERE name = "AgencyNovel";
- Query OK, 1 row affected (0.006 sec)
- Rows matched: 1 Changed: 1 Warnings: 0
- MariaDB [reservations]>
- MariaDB [reservations]> UPDATE agency
- -> SET telnum = "0888112233"
- -> WHERE name = "AgencyNew";
- Query OK, 1 row affected (0.007 sec)
- Rows matched: 1 Changed: 1 Warnings: 0
- MariaDB [reservations]> DELETE FROM clients
- -> WHERE egn = 7702031111;;
- Query OK, 1 row affected (0.004 sec)
- ERROR: No query specified
- MariaDB [reservations]> UPDATE agency
- -> SET city = "Stara Zagora"
- -> WHERE country = "Bulgaria";
- Query OK, 6 rows affected (0.008 sec)
- Rows matched: 7 Changed: 6 Warnings: 0
- MariaDB [reservations]>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement