Differences

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

Link to this comparison view

Next revision
Previous revision
mysql_server [2018/09/24 19:33]
ktm5j created
mysql_server [2019/09/26 13:39] (current)
ktm5j
Line 1: Line 1:
 ====== CS MySQL ====== ====== CS MySQL ======
  
-Computer Science hosts a MySQL server (mariadb-5.5.56-2) at the DNS address ''​%%mysql.cs.virginia.edu%%''​. ​ Accounts for this server are created by request via <​cshelpdesk@virginia.edu>​.+Computer Science hosts a MySQL server (mariadb-5.5.56-2) at the DNS address ''​%%mysql.cs.virginia.edu%%''​. ​ Accounts for this server are created by request via <​cshelpdesk@virginia.edu>​.  We chose to migrate to MariaDB over Oracle MySQL for a number of reasons, most notably because new versions of MySQL dropped support certain legacy features that would have forced us to drop and/or recreate almost half of our user accounts. ​ MariaDB comes with a guarantee that it will stay open source whereas the future of MySQL is left up Oracle.
  
 ===== 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 22: Line 30:
 abc6de_1 abc6de_1
 </​code>​ </​code>​
 +
 +===== MySQL Client =====
 +
 +==== 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 ====
 +
 +Our [[linux_environment_modules|module]] for PHP was built with database support and drivers for MySQL.
 +
  • mysql_server.1537817638.txt.gz
  • Last modified: 2018/09/24 19:33
  • by ktm5j