- I had a similar issue on Mac OS and I was able to fix it this way: From the terminal, run: mysql -u root -p -h 127.0.0.1 -P 3306 Then, I was asked to enter the password. I just pressed enter since no password was setup. I got a message as follows: Welcome to the MySQL monitor. Commands end with; or g. Your MySQL connection id is 181.
- Windows — Copy C:/Program Files/MySQL/MySQL Workbench 8.0 CE/ making sure to replace the last folder's name with the most current MySQL name. Mac — Copy /usr/local/mysql-8.0.13-osx10.13-x8664/ making sure to replace the last folder's name with the most current MySQL folder name.
I’m Dan Benjamin. I’m a podcaster, writer, and software developer based in Austin, Texas. I’m the founder of Fireside.fm, a podcast hosting and analytics platform I helped create to make podcast hosting easy, reliable, and fun. I’m also the founder of the 5by5 Studios where I get to talk to with my friends and heroes while fullfilling my lifelong dream of doing talk radio.
In a past life, I was a corporate stooge and eventual CTO of several startups. I've written for A List Apart and O’Reilly, made screencasts for PluralSight, and been coding for almost two decades. I co-founded a pre-Facebook social network about wine called Cork’d (acquired by Gary Vaynerchuk) and a website for parents called Playgrounder (aquired by Uncrate).
Projects
I’m Dan Benjamin. I’m a podcaster, writer, and software developer based in Austin, Texas. I’m the founder of Fireside.fm, a podcast hosting and analytics platform I helped create to make podcast hosting easy, reliable, and fun.
I enjoy making things that help people. Here's a list of my recent projects.
Voice Work
Hire me for voice work, narration, commercials, voice over for your videos, and more.
I'm available through Voices.com and for smaller projects, I'm available on Fiverr.
Dan Benjamin Live!
I do a daily morning stream with a focus on news and analysis. I also make videos teaching people how to podcast, including tutorials, gear reviews and recommendations, tips, tricks, advice, and more. I love doing this, so please like and subscribe …
Fireside
Fireside is a podcast hosting and analytics platform I created to make podcast hosting easy, reliable, and fun. I took everything I've learned as a podcaster since 2006 (and full-time at 5by5 since 2009) and built it into Fireside. It took years to build, and if you're interested in podcasting, I'd love for you to try it.
5by5
Started in 2009, 5by5 was one of the first podcast networks around. We make shows for geeks, gamers, and people like you. I host a number of shows there, and we producer about 25 total shows per week. 5by5 exists due to the generosity of our sponsors and the listeners who support us.
Podcast Method (Website and Podcast)
I love podcasting, and I love to teach people what I know about it. Podcast method is both a website and a podcast. The website lists my recommended gear and equipment, with advice about how to use it. The podcast talks in detail about these topics, and I do my best to answer listener questions each week.
Bacon Method
I love bacon but I hate mess. Fortunately, I discovered a way to make perfect, crispy bacon every time with the minimum amount of preparation and cleanup. This site teaches you how.
What’s the matter?
For years MySQL and MariaDB have been the most popular OpenSource Database Managment Systems world wide. So it is no surprise that most of the common software support them natively.
There are actually only two large areas of databases. Relational databases (MySQL, PostgreSQL, Oracle and similar), and so-called non-relational databases, also called no-SQL databases.
MySQL and MariaDB belong to the relational databases.
We work with these databases very often and have found that most tasks can be done with a handful of commands. In this article, we will guide you through the commands of MySQL or MariaDB to create a new database.
Then we will show you how to delete the new (or any other) database.
Starting MySQL Console
First, log on to your MySQL or MariaDB server. To do this, connect to your server via SSH. On Windows, you can use the program PuTTY, on Linux, use any terminal program (like xTerm), and on MAC OS X you simply use the built-in terminal (type “terminal” in the Spotlight search and confirm with Enter).
If you are logged on to the server, you can simply log on to your MySQL or MariaDB server. If you have not yet created a new user who has the rights to create new databases, use the user ‘root’.
Log on as root user on MySQL
The registration process is very simple. Once you are logged in to your server, you simply use mysql-binary to login.
If your MySQL or MariaDB server has set a password, then you call the program as follows:
If you have not set a password for the user root, do not use the parameter ‘-p’. If everything goes well, then you should see the following output:
Directly after logging in as an administrative user (root), you can create new databases or display existing databases.
List all Databases
If you have a freshly installed system with a new MySQL or MariaDB instance, then probably not all too many databases exist. First of all, let MySQL or MariaDB show you all existing databases with the command ‘SHOW DATABASES;’. Make sure you have the command in your SQL console with the semicolon; at the end.
As you see, my server is boring and empty.
Create a MySQL or MariaDB database
DaCreating a new database under MySQL or MariaDB is just as easy as listing the existing databases. Just use the SQL command ‘CREATE DATABASE <name>;’ to create a Database with the name <name>.
If everything went well, you just created a database called blog. If you now list all your databases again, you can find the newly created database in the output:
Deleting a MySQL or MariaDB database
If you delete a database directly with the command line tool, be sure to delete the correct one. Once the database is deleted, there is normally no going back.
First list all databases on your server. Use the command ‘SHOW DATABASES;’ in the mysql-console like in the example above.
Now copy the name of the database you want to delete.
To do delete a database you need the command ‘DROP DATABASE’. The syntax is similar to creating a database. ‘DROP DATABASE <name>;’, where <name> is the name of the database you want to delete.
An example could look like this:
The mysql-console is not very helpful here. If everything went correctly it will show you a simple “OK”.
Use the command ‘SHOW DATABASES;’ to double check the database was deleted.
More information
Start Mysql In Mac Terminal
- How to create a User and grant privileges on MySQL and MariaDB. (German only)
What’s the matter? For years MySQL and MariaDB have been the most popular OpenSource Database Managment Systems world wide. So it is no surprise that most of the common software support them natively. There are actually only two large areas of databases. Relational databases (MySQL, PostgreSQL, Oracle and similar), and so-called non-relational databases, also called […]
Mysql Mac Terminal Command Not Found
Thank you for your feedback!
We will get back to you as soon as the article is finished.