mysql databases - mysql

could you guys please explain for me HOW these databases ARE CREATED :
mysql
phpmyadmin
information_schema
performance_schema
I know it's a novice question, I might GUESS the answer for some of them, for example "the reason phpmyadmin database is created" IS because I installed phpmyadmin and this database was created alongside . That's not for sure, so I just need some clarification.
Thank you !

Mysql is a database server. It serves access to databases. It runs on a machine as a service.
Phpmyadmin is a php based tool you install for managing mysql from a web page.
The last two are databases that can be created by an application, such as phpmyadmin, for storing schema information about the rest of the database or tables of a database.

These are the standard set of databases shown when you execute SHOW DATABASES on a clean MySQL install.
mysql - this is created at install of the MySQL server, either by the package management system of your operating system or the script provided as part of the MySQL package
information_schema - meta database, it does not exist on the disk
performance_schema - meta database, but it does store some files on the disk
Any other databases are user/application created.

Related

How do I put a database onto a local server?

I have a bunch of backed up wordpress mysql database files, I am trying to access them in Microsoft Webmatrix. I originally used WAMP. I honestly have no idea what I'm doing. I am under the impression I have to have the database running on a server in order to connect to it? Help please...
You'll want to have a MySQL server instance installed (this may already be the case), then you can simply restore those backups. This link will help you with syntax for restoring databases from .sql files http://webcheatsheet.com/sql/mysql_backup_restore.php
Depending on the version of MySQL you have installed, and the version of MySQL the databases were created with, you may have to upgrade the databases. More information can be found here: https://dev.mysql.com/doc/mysql-enterprise-backup/3.8/en/restore-upgrade.html

What are these unexpected databases in my MySQL AWS RDS instance?

On my AWS RDS MySQL instance I have some databases I didn't explicitly create there (and have never seen on my local MySQL databases, or on other hosted databases I've worked with) and wonder what they are (and what I can do about them):
information_schema
mysql
performance_schema
innodb
The first three are filled with data that I don't understand (and are listed separately in my MySQL tools; e.g. I have no ability to control privileges for them separately), while the last is empty. Can I delete the innodb? What are the others (I assume I should leave them alone)?
Forgive what may turn out to be a naive MySQL or AWS question; I'm fairly new to both.
These are all normal.
Every MySQL installation has the mysql and information_schema databases. If you can't see them, then either you either don't have permission to see them, or whatever you're using to connect to the MySQL server is hiding them from you. Most newer MySQL installations also have performance_schema.
The innodb database on RDS isn't really a database, but it shows up in the list because of the way the design of RDS interacts with MySQL server's internal concept that each directory inside that datadir is assumed to be a database. Files that InnoDB uses internally are stored there, even though the "database" itself appears to be empty. Just disregard it.
The mysql database contains tables used internally by MySQL, including the grant tables and time zone tables, and some DBA tools in the form of stored procedures that are specific to RDS, which are required due to the restricted access that even the administrator account has to an RDS instance, when compared to a standalone MySQL server.
http://dev.mysql.com/doc/refman/5.6/en/information-schema.html
http://dev.mysql.com/doc/refman/5.6/en/performance-schema.html
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MySQL.CommonDBATasks.html

inspect mySQL database

I have a mySQL database on my Windows PC. I'm pretty sure I've found the relevant files, namely the following:
formula.frm
formula.ibd
db.opt
What is the natural way to inspect, edit, and generally play with the contents of these files?
You do not view the binary database files directly. MySQL is a service that you connect to with a client and then perform SQL commands. You will need a client (such as MySQL Workbench) to work with the server.
MySQL Workbench is the GUI tool that allows you to connect to a MySQL database and perform actions on it including querying and creating/modifying the various parts of the database.
MySQL Workbench intro: http://dev.mysql.com/doc/workbench/en/wb-intro.html
Getting started with MySQL: http://dev.mysql.com/doc/refman/5.6/en/tutorial.html
There is also the command-line utility that is included when you install the server. It will be in the BIN folder of the MySQL install directory.
Command-line client info: http://dev.mysql.com/doc/refman/5.1/en/mysql.html
Use a tool like Mysql Workbench to connect to the DB. You do nothing directly to the files. You connect to the service and use the DB.
William, it sounds like your question is "how do I take mysql binary files and turn them into something usable on my machine?". If that's the case, you'll want to first install MySQL on your machine if you haven't already. Then you might have a look here for how to recreate a database from a .ibd file.

Find and transfrer mysql database to another computer

i'm using myaql database for my website which is in my computer.
I'm trying to transfer the database to another computer but I can't find any mysql database file...
My question is if it is possible and how can I do it? (Is there any simple way?)
MYSQL DUMP
It can be used to dump a database or a collection of databases for backup or transfer to another SQL server (not necessarily a MySQL server).

can't see other database on mysql workbench

two computers installed mysql 5.5.25a which downloaded from the mysql official site. one is connecting to another's mysql server through MySql WorkBench,but can only see the 'test' database ,can't see others database for example the 'sakila' database.How can i fix it?
You have to manually import sakila/world/menagerie databases from here. Only these databases- test, mysql, information_schema and performance_schema would be present after installing MySQL.