I'm trying to install mybb on a server but the admin is taking too long to respond. I have all the information I need except the database name. Is there a default name for mysql on a linux server?
4 Answers
There is no default database.
A fresh MySQL server install will have 0 databases. The install script will run mysql_install_db after the server is running to create a mysql database, which MySQL uses to store users and privileges. Don't put your data there.
You can create your own databases by issuing CREATE DATABASE [name] queries if your user has permission.
2 Comments
No default database in MySQL
MySQL does not create a database by default for you. If connecting to a fresh MySQL server, you will find four databases existing, described below.
4 databases in MySQL
When first connecting to a new MySQL 8.1 server on a terminal, like this:
mysql -u root -p -h localhost
… at the prompt you can issue this SQL command to see all existing databases:
SHOW DATABASES ;
You will find four databases:
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)
- The first is required by the SQL standard:
information_schema. See Wikipedia. See doc. - According to this AI,
mysqlis a system schema for storing User Accounts, Access Control settings, Server Configuration settings, and system-level Stored Procedures and Functions. (I cannot find a page in the manual for this.) performance_schemais a feature for monitoring MySQL Server execution at a low level. See doc.sysis a set of objects that helps DBAs and developers interpret data collected by the Performance Schema. See doc.
We can then create a database for our own purposes.
CREATE DATABASE bogus_ ;
Tip: Use a trailing underscore on all your names. The SQL standard explicitly promises to never define a keyword with a trailing underscore. This approach eliminates any chance of collision with any of the over a thousand keywords and reserved words used across various SQL database products.
Comments
Do you have full database access? Then just add a database with a name of your choice:
CREATE DATABSE rob_bb;If you only have a normal user access, the database name is often the same as the username.
Or you can run the query
SHOW DATABASES;
to see what databases exist (which you are allowed to see).