Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
mysql_server [2018/09/24 19:47]
ktm5j
mysql_server [2019/09/26 13:39] (current)
ktm5j
Line 4: Line 4:
  
 ===== Server Info ===== ===== Server Info =====
 +
 +=== CS Department Server ===
  
 ^ Server | mysql.cs.virginia.edu | ^ Server | mysql.cs.virginia.edu |
 ^ TCP/IP Port | 3306 | ^ TCP/IP Port | 3306 |
 +^ phpMyAdmin | https://​www.cs.virginia.edu/​csdb |
 +
 +=== CS 4750 ===
 +^ Server | cs4750.cs.virginia.edu |
 +^ TCP/IP Port | 3306 |
 +^ **CS4750** phpMyAdmin | https://​cs4750.cs.virginia.edu/​phpMyAdmin |
  
 Currently the MySQL server is hosted on the same physical server as the web server. ​ This means that both ''​%%mysql.cs.virginia.edu%%''​ and ''​%%www.cs.virginia.edu%%'',​ however we ask that you **only use** ''​%%mysql.cs.virginia.edu%%''​ to connect so that if this ever changes in the future you won't have issues. Currently the MySQL server is hosted on the same physical server as the web server. ​ This means that both ''​%%mysql.cs.virginia.edu%%''​ and ''​%%www.cs.virginia.edu%%'',​ however we ask that you **only use** ''​%%mysql.cs.virginia.edu%%''​ to connect so that if this ever changes in the future you won't have issues.
Line 25: Line 33:
 ===== MySQL Client ===== ===== MySQL Client =====
  
-All of our Linux server ​and desktops should have the ''​%%mysql%%''​ command available.+==== phpMyAdmin ==== 
 + 
 +There is an installation of phpMyAdmin hosted on our web server at the following address: https://​www.cs.virginia.edu/​csdb/​ 
 + 
 +==== Linux ==== 
 + 
 +All of our Linux servers ​and desktops should have the ''​%%mysql%%''​ command available. ​ Here is a brief example of logging in and creating a table: 
 + 
 +<code mysql> 
 +ktm5j@kurma ~ $ mysql -h mysql.cs.virginia.edu -u abc6de -p 
 +Enter password:  
 +Welcome to the MariaDB monitor. ​ Commands end with ; or \g. 
 +Your MariaDB connection id is 650764 
 +Server version: 5.5.56-MariaDB MariaDB Server 
 + 
 +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)]>​ CREATE DATABASE abc6de_Media 
 +    -> ; 
 +Query OK, 1 row affected (0.00 sec) 
 + 
 +MariaDB [(none)]>​ show databases;​ 
 ++--------------------+ 
 +| Database ​          | 
 ++--------------------+ 
 +| information_schema | 
 +| abc6de ​            | 
 +| abc6de_Media ​      | 
 ++--------------------+ 
 +2 rows in set (0.00 sec) 
 + 
 +MariaDB [(none)]>​ CREATE TABLE abc6de_Media.Movies ( 
 +    -> id int NOT NULL AUTO_INCREMENT,​ 
 +    -> Title varchar(100) NOT NULL, 
 +    -> ReleaseDate TIMESTAMP NOT NULL, 
 +    -> CONSTRAINT Movies_PK PRIMARY KEY (id), 
 +    -> CONSTRAINT Movies_UN UNIQUE KEY (Title) 
 +    -> ) 
 +    -> ENGINE=InnoDB 
 +    -> DEFAULT CHARSET=latin1 
 +    -> COLLATE=latin1_swedish_ci;​ 
 +Query OK, 0 rows affected (0.00 sec) 
 + 
 +MariaDB [(none)]>​ use abc6de_Media 
 + 
 +Database changed 
 +MariaDB [abc6de_Media]>​ SHOW TABLES; 
 ++------------------------+ 
 +| Tables_in_abc6de_Media | 
 ++------------------------+ 
 +| Movies ​                | 
 ++------------------------+ 
 +1 row in set (0.00 sec) 
 + 
 +MariaDB [abc6de_Media]>​ INSERT INTO Movies(Title,​ ReleaseDate) VALUES ( 'The Usual Suspects',​ '​1995-09-15'​);​ 
 +Query OK, 1 row affected (0.00 sec) 
 + 
 +MariaDB [abc6de_Media]>​ SELECT * FROM Movies; 
 ++----+--------------------+-------------+ 
 +| id | Title              | ReleaseDate | 
 ++----+--------------------+-------------+ 
 +|  1 | The Usual Suspects | 1995-09-15 ​ | 
 ++----+--------------------+-------------+ 
 +1 row in set (0.00 sec) 
 +</​code>​
  
 ==== PHP ==== ==== PHP ====
  • mysql_server.1537818447.txt.gz
  • Last modified: 2018/09/24 19:47
  • by ktm5j