World’s most popular open source database.
Configure and deploy a relational database management system used by enterprises and small businesses alike. MySQL, or MariaDB for Linux distributions, is primarily used for web and server applications, including as a component of the industry-standard LAMP and LEMP stacks. MySQL/MariaDB is a popular choice for high-growth environments and the developers who maintain them due to its reliability, out-of-the-box security, and flexibility in order to scale.
Launch the RDS of your choice with Linode’s MySQL / MariaDB Database One-Click App start building your own database.
|MySQL or MariaDB
|Select which database service you’d like to use. Required.
|MySQL Root Password
|The root password for your MySQL database. Required.
|The user for your MySQLDB database. Required.
|MySQL User Password
|The user password for your MySQL database. Required.
|The database on your MySQL. Required.
|The limited sudo user to be created for the Linode
|This is the limited user account to be created for the Linode. This account has sudo user privileges.
|The password for the limited sudo user
|Set a password for the limited sudo user. The password must meet the complexity strength validation requirements for a strong password. This password can be used to perform any action on your server, similar to root, so make it long, complex, and unique.
|The SSH Public Key that will be used to access the Linode
|If you wish to access SSH via Public Key (recommended) rather than by password, enter the public key here.
|Disable root access over SSH?
Yes to block the root account from logging into the server via SSH. Select
No to allow the root account to login via SSH.
|Your Linode API Token
API Token is needed to create DNS records. If this is provided along with the
domain fields, the installation attempts to create DNS records via the Linode API. If you don’t have a token, but you want the installation to create DNS records, you must create one before continuing.
|The subdomain you wish the installer to create a DNS record for during setup. The suggestion given is
www. The subdomain should only be provided if you also provide a
|The domain name where you wish to host your Moodle site. The installer creates a DNS record for this domain during setup if you provide this field along with your
|Select an Image
|Ubuntu 20.04 LTS is currently the only image supported by the MySQL Marketplace App, and it is pre-selected on the Linode creation page. Required.
|The region where you would like your Linode to reside. In general, it’s best to choose a location that’s closest to you. For more information on choosing a DC, review the How to Choose a Data Center guide. You can also generate MTR reports for a deeper look at the network routes between you and each of our data centers. Required.
|Your Linode’s hardware resources. The Linode plan you deploy your MySQL/MariaDB on should account for the estimated workload. If you are standing up a simple web page, you can use a 1GB Linode (Nanode) or 2GB Linode. If you will deploy a more robust web app, then consider a plan with higher RAM and CPU allocations. If you decide that you need more or fewer hardware resources after you deploy your app, you can always resize your Linode to a different plan. Required.
|The name for your Linode, which must be unique between all of the Linodes on your account. This name will be how you identify your server in the Cloud Manager’s Dashboard. Required.
|The primary administrative password for your Linode instance. This password must be provided when you log in to your Linode via SSH. The password must meet the complexity strength validation requirements for a strong password. Your root password can be used to perform any action on your server, so make it long, complex, and unique. Required.
Getting Started After Deployment
- SSH into your Linode and create a limited user account.
- Log out and log back in as your limited user account.
- Update your server:
sudo apt-get update && apt-get upgrade
The standard tool for interacting with MySQL is the
mysql client which installs with the
mysql-server package. The MySQL client is used through a terminal.
- To log in to MySQL as the root user:
sudo mysql -u root -p
- When prompted, enter the MySQL root password that you set when launching the One-Click App. You’ll then be presented with a welcome header and the MySQL prompt as shown below:
- To generate a list of commands for the MySQL prompt, enter
\h. You’ll then see:
List of all MySQL commands:
Note that all text commands must be first on line and end with ';'
? (\?) Synonym for `help'.
clear (\c) Clear command.
connect (\r) Reconnect to the server. Optional arguments are db and host.
delimiter (\d) Set statement delimiter. NOTE: Takes the rest of the line as new delimiter.
edit (\e) Edit command with $EDITOR.
ego (\G) Send command to mysql server, display result vertically.
exit (\q) Exit mysql. Same as quit.
go (\g) Send command to mysql server.
help (\h) Display this help.
nopager (\n) Disable pager, print to stdout.
notee (\t) Don't write into outfile.
pager (\P) Set PAGER [to_pager]. Print the query results via PAGER.
print (\p) Print current command.
prompt (\R) Change your mysql prompt.
quit (\q) Quit mysql.
rehash (\#) Rebuild completion hash.
source (\.) Execute an SQL script file. Takes a file name as an argument.
status (\s) Get status information from the server.
system (\!) Execute a system shell command.
tee (\T) Set outfile [to_outfile]. Append everything into given outfile.
use (\u) Use another database. Takes database name as argument.
charset (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets.
warnings (\W) Show warnings after every statement.
nowarning (\w) Don't show warnings after every statement.
For server side help, type 'help contents'
4. Grant access to the database that you created when launching the One-Click App for MySQL User. In this example, the database is called
webdata, the user
webuser, and password of the user is
password. Be sure to enter your own password. This should be different from the root password for MySQL:
GRANT ALL ON webdata.* TO 'webuser' IDENTIFIED BY 'password';
5. To Exit MySQL/MariaDB type:
Create a Sample Table
- Log back in as MySQL User that you set when launching the One-Click App. In the following example the MySQL User is
sudo mysql -u webuser -p
- Create a sample table called
customers. This creates a table with a customer ID field of the type
INTfor integer (auto-incremented for new records, used as the primary key), as well as two fields for storing the customer’s name. In the following example
webdatais the database that you created when launching the One-Click App.
create table customers (customer_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, first_name TEXT, last_name TEXT);
3. To view the contents of the table that you created:
describe customers; The output would be:
4. Then exit MySQL/MariaDB.
The MySQL / MariaDB Database One-Click App was built by Linode. For support regarding app deployment, contact Linode Support via the information listed in the sidebar. For support regarding the tool or software itself, visit MySQL Support.