For years I have always managed my MySQL databases by entering the MySQL server and executing the instructions, that is:
mysql -u root -p
And here I write the password and I can do what I want, however I just discovered: mysqladmin
MySQL version and status?
First, let's check the version of MySQL that is installed:
mysqladmin -u root -p ping
O well:
sudo service mysql status
In my case I get this:
Still, they can know the version of MySQL that is running with:
mysqladmin -u root -p version
How to set or change password to root in MySQL?
In many distros when a MySQL server is installed it is not always configured with a root password by default for MySQL, to establish a password for root when it does not have it is as simple as:
mysqladmin -u root password PASSWORD-QUE-QUIERAN
If not, and they do have a password for root but want to change it, the syntax is as follows:
mysqladmin -u root -pPASSWORD-QUE-TIENEN password 'NUEVO-PASSWORD'
How to create a database in MySQL?
As simple as running:
mysqladmin -u root -p create NOMBRE-DE-DB
How to delete a database in MySQL?
Very similar to the previous instruction:
mysqladmin -u root -p drop NOMBRE-DE-DB
How to know what connections there are to the MySQL server?
mysqladmin -u root -p status
At the moment I write this article on my laptop it shows me the following:
Uptime: 19381 Threads: 1 Questions: 9518 Slow queries: 0 Opens: 431 Flush tables: 1 Open tables: 106 Queries per second avg: 0.491
Likewise, if you want to know all the values and conditions of the variables, just put:
mysqladmin -u root -p extended-status
The output will be much more extensive this time.
Or if this doesn't tell you the information you need, try:
mysqladmin -u root -p variables
In case you want to reload the privileges, that is, make a flush the command would be:
mysqladmin -u root -p reload;
mysqladmin -u root -p refresh
All these commands work with the MySQL server being in localhost, if you want to execute instructions on a remote server you must add:
-h IP-DE-SERVIDOR
Anyway, I know that many prefer PHPMyAdmin and others simply prefer the terminal, here we have some tips for the terminal 😉
If you want to know more about MySQLAdmin you already know - » mysqladmin --help
regards
Notice to the editor of the post that the image could not be viewed or there are problems with the directory permissions to view the graphic.
I correct it right now, thanks 🙂
Still not seen 😮
right away, the change is applied
So far, I don't see anything at all. The easiest thing is to upload the image to Imgur, then you link it and that's it.
It's fixed, sorry for the delay ... I had trouble getting online these days.
Mmm .. I can't see the image either, it seems that "someone" put his fingers where he shouldn't 😀
Learn Microsoft Access, don't waste time with this. Nobody uses it
JAAAAAAAAAAAAAAAAAAAAAJAJAJAJAJAJAJAJAJAAJAJA… Microsoft Access? Seriously? Good grief, what to read ...
I also say the same, although MySQL seems much easier to handle than Access in terms of its functionalities (and more if you do it from the console).
Is that Access is not at all the same as MySQL. Let's see Who manages the DB of a site using Access?
is that acces does not do the same function LOL!
In Peru, they do use it a lot in MyPES, even so the actual use that this system is given is minimal, without considering that it is quite weak compared to MySQL / MariaDB, PostgreSQL and gang.
Friend Access is not a DB as such, sql server yes, access is like a small simulation of DB, Mysql if it is a database engine, which in these times has many things that proprietary DBs, nothing to envy to other engines by DB.
Did you know that internet hosts give native support to mysql? many cms such as drupal, joomla, wordpress and everything related to web applications in most cases use mysql, where they teach you for sure that they are doing something basic and that is why they use access, but it is necessary that you read and find out about engines or managers of databases.
Rodolfo Yes You Know Thank You
Acces is not a DB acces is a proprietary Guindous program
Surely, the problem was due to the fact that KZKGGaara was playing with the VPN's BD and totally made the image not visible.
In the case of being so useless that none of the commands worked for you, copy this command in a terminal:
~ # sudo apt-get -y remove --purge mysql
JAJAJAJAJAJAJAJAJAJAJAJAAAAAAAAAAAA !!!!!!
I can't believe they threw in the towel so quickly with MySQL.
Hello
access is used by those who can't afford anything better, and any large company uses mysql,
stop being a troll
That is why in Peru, being hyper-dependent on Microsoft, it is using its products exhaustively (among them, Access and SQL Server).
I think an important command is missing: mysql -u root -p source db-name used to import a database. Regards.
I know that since I was taught MySQL with Windows.
So far I have not found a great new tool to work with MySQL - Valentina Studio. It's the free edition you can do more than the many commercial tools!
Highly recommended to check it out. http://www.valentina-db.com/en/valentina-studio-overview
How to Manage db mysql in centos 6 with windows client
Estimated.
How can I know by console in a linux server, the installed database engines?
Thank you.
Atte.
ML
Hello,
Well assuming you use a distro like Debian that has the aptitude command already installed, you could check like this:
aptitude search mysql | grep server
This will tell you whether or not the MySQL server is installed
You could try the same with Postgre.
Remember that the first letter on the left is the indicator. P means it is not installed, I means it is installed.
I loved this information, it is very interesting 😉
thank you for everything…