This how-to guide maps out two pretty basic but handy MySQL operations, creating and binning a database, using the terminal interface.
Sure, you can do those with, say, phpMyAdmin, but it's way quicker to perform such functions using the CLI.
Substitute "db_username", "db_password", "db_password" and "db_name" with those of your own.
Set Up an Unmanaged VPS (4 Newbies) .. The V-P-S Bible
In 20 copy/paste steps .. from zero to hero, blank box to cute-as Linux server.
Scroll down for the full series index.
So, hey, shed shared & viva virtual! Hope it helps. the_guv
Add a MySQL Database
From the command line interface, we need first to access the mysql shell:-
mysql -u root -p
And before actually creating the db, you need to set up the database user and password.
grant all privileges on *.* to db_username@localhost identified by "db_password";
Now create the db:-
create database db_name;
And exit the MySQL shell:-
quit
Delete a MySQL Database
Easy tiger! From the command line interface, we need first to access mysql:-
mysql -u root -p
And delete the sucker:-
delete database db_name;
And here's an alternative way to exit the MySQL shell:-
\q
Serve multi sites & blogs on a budget .. at the fastest possible speed .. with the least downtime .. in the most secure environment .. and future-proofed for easy admin.
That's what the VPS Bible is about, stepped out in simple copy & paste guides.
From high traffic WordPress blogs to startup web hosts, here's what you need.
Congratulations! You have one humdinger of a web server! If you followed the Bible to a T, it's speedy, solid & secure.
But. As explained in Part 16, the Nginx web server has no compatible control panel .. yet. Then again, even if it did, do you really want the resource drain?
In the VPS Admin series is every maintenance procedure you'll need to know. And, hey, using these is a darn sight faster than using a control panel anyhow.
Set it up? Click here for the 21 part follow-up .. V-P-S Admin
Go back? Click here for the original series .. The V-P-S Bible
- * Includes video tutorial.
- Not linked = not published. Won't be long. Fix a feed for updates.
If you liked that ...
-
This guide shows how to save a MySQL database using a terminal, with a simple syntax command. And faster than using phpMyAdmin, for sure.
Just replace the db name, username and password and paste the code into your [...]
-
This guide provides the syntax for uploading data to a MySQL database. For instance, you've changed Linux server, have added a blank database and now want to add your previously backed up data.
Just replace the db [...]
-
Change repetitive db data with one single syntax command. Rather than manually find & alter each instance, isolate the lot & update multiple content.
This is handy when you want to swap or lose an identical [...]
-
So you've gone and locked yourself out of MySQL? Feels a bit like leaving the car keys in the trunk, huh? :D Sorry to laugh! But I can, 'cos I'm gonna show you how to get back in.
It's really not so tough. Using [...]
-
This tutorial steps out how to create a Linux user and set permissions. It can be used as part of the VPS Bible 20-Part series, else as a standalone guide. Just thought I'd clear that up.
Before carrying on [...]
-
When I started this series I figured I'd cover it in maybe 7 or 8 posts.
I had more hair in those days, and you were younger too.
Apart from underestimating the subject, fact is, with the intended audience for the [...]
... maybe you'll like these?
ADD or DELETE MySQL Database using Terminal - VPS ADMIN #4 - GUVNR : hostingwebsitereviews.com July 20th, 2009 at 1:56 pm
[...] Read more from the original source: ADD or DELETE MySQL Database using Terminal - VPS ADMIN #4 - GUVNR [...]
ADD or DELETE MySQL Database using Terminal - VPS ADMIN #4 - GUVNR : websiteshostingreviews.com July 20th, 2009 at 1:58 pm
[...] Continue reading here: ADD or DELETE MySQL Database using Terminal - VPS ADMIN #4 - GUVNR [...]
ADD or DELETE MySQL Database using Terminal - VPS ADMIN #4 - GUVNR : Best Web Hosting Review Website July 20th, 2009 at 3:16 pm
[...] More here: ADD or DELETE MySQL Database using Terminal - VPS ADMIN #4 - GUVNR [...]
ADD or DELETE MySQL Database using Terminal - VPS ADMIN #4 - GUVNR : tntwebhostings.com July 20th, 2009 at 3:27 pm
[...] Continue reading here: ADD or DELETE MySQL Database using Terminal - VPS ADMIN #4 - GUVNR [...]
ADD or DELETE MySQL Database using Terminal - VPS ADMIN #4 - GUVNR | Green Web hosting July 20th, 2009 at 3:40 pm
[...] from: ADD or DELETE MySQL Database using Terminal - VPS ADMIN #4 - GUVNR Top 5 Green Web Hosting Companies, Click [...]
ADD or DELETE MySQL Database using Terminal - VPS ADMIN #4 - GUVNR : hostwebsitereview.com July 20th, 2009 at 3:43 pm
[...] Read the original: ADD or DELETE MySQL Database using Terminal - VPS ADMIN #4 - GUVNR [...]