Dear all,
I have not used my mysql for years. I do not remember any user associated with it or any database that I created inside it (no worries I do not need anything).
I want to wipe out everything and start from the point like just having made the installation. 1.How I can wipe out all users and databases inside it (I have root permissions ofc)
2. How then I can add a new mysql user?
I would like to thank you in advance for your help
zypper install --force mysql-community-server mysql-community-server-client
Daten des Repositories laden ...
Installierte Pakete lesen ...
Installation von 'mysql-community-server-5.5.16-3.3.1.x86_64' aus Repository 'openSUSE-12.1 OSS' wird erzwungen.
Installation von 'mysql-community-server-client-5.5.16-3.3.1.x86_64' aus Repository 'openSUSE-12.1 OSS' wird erzwungen.
Paketabhängigkeiten auflösen ...
Die folgenden Pakete werden erneut installiert:
mysql-community-server mysql-community-server-client
2 zu installierende Pakete.
Gesamtgröße des Downloads: 7,2 MiB. Kein zusätzlicher Speicherplatz wird nach dieser Operation belegt oder freigegeben.
Fortfahren? [j/n/?] (j): j
Paket mysql-community-server-client-5.5.16-3.3.1.x86_64 wird abgerufen (1/2), 736,0 KiB (17,0 MiB entpackt)
Abruf: mysql-community-server-client-5.5.16-3.3.1.x86_64.rpm [fertig]
Paket mysql-community-server-5.5.16-3.3.1.x86_64 wird abgerufen (2/2), 6,5 MiB (41,6 MiB entpackt)
Abruf: mysql-community-server-5.5.16-3.3.1.x86_64.rpm [fertig (5,1 MiB/s)]
Installation von: mysql-community-server-client-5.5.16-3.3.1 [fertig]
Installation von: mysql-community-server-5.5.16-3.3.1 [fertig]
Zusätzliche rpm-Ausgabe:
redirecting to systemctl
redirecting to systemctl
(which means that the installation was correct)
but then
sudo /etc/init.d/mysql start
redirecting to systemctl
Job failed. See system logs and 'systemctl status' for details.
MySQL root user is separate to the system root user.
MySQL root user has a default blank password, until you set one.
This is how you log in, get hellp, connect to a database, and quit.
user@host:~> mysql -h localhost -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.5.16-log Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> help
For information about MySQL products and services, visit:
http://www.mysql.com/
For developer information, including the MySQL Reference Manual, visit:
http://dev.mysql.com/
To buy MySQL Enterprise support, training, or other products, visit:
https://shop.mysql.com/
List of all MySQL commands:
Note that all text commands must be first on line and end with ';'
? (\?) Synonym for `help'.
clear (\c) Clear the current input statement.
connect (\r) Reconnect to the server. Optional arguments are db and host.
delimiter (\d) Set statement delimiter.
edit (\e) Edit command with $EDITOR.
ego (\G) Send command to mysql server, display result vertically.
exit (\q) Exit mysql. Same as quit.
go (\g) Send command to mysql server.
help (\h) Display this help.
nopager (
) Disable pager, print to stdout.
notee ( ) Don't write into outfile.
pager (\P) Set PAGER [to_pager]. Print the query results via PAGER.
print (\p) Print current command.
prompt (\R) Change your mysql prompt.
quit (\q) Quit mysql.
rehash (\#) Rebuild completion hash.
source (\.) Execute an SQL script file. Takes a file name as an argument.
status (\s) Get status information from the server.
system (\!) Execute a system shell command.
tee (\T) Set outfile [to_outfile]. Append everything into given outfile.
use (\u) Use another database. Takes database name as argument.
charset (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets.
warnings (\W) Show warnings after every statement.
nowarning (\w) Don't show warnings after every statement.
For server side help, type 'help contents'
mysql> use test;
Database changed
mysql> show tables;
Empty set (0.00 sec)
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| db |
| event |
| func |
| general_log |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| host |
| ndb_binlog_index |
| plugin |
| proc |
| procs_priv |
| proxies_priv |
| servers |
| slow_log |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
24 rows in set (0.00 sec)
mysql> \q
Bye
user@host:~>
If you will not follow my diagnostic suggestions in the order provided, and report back at each stage before asking the next question, I cannot help you.
Actually you are behaving as a troll to deliberately waste my time.
I am following exactly what you say. In the previous post you were suggesting me to connect to mysql
by doing
mysql -h localhost -u root -p .
Before that I ahve to start mysql server which I tried doing with /etc/init.d/mysql start. So before trying what you are suggesting I am stuck at a previous point.
This is wheris thread started. You have been given the list of files and directories to remove, and the packages to re-install via YaST.
Yes they are standard databases, but will not be “as new” if you have been experimenting. You can use
*YaST >> System >> System Services (Runlevel) *
to enable/disable mysql running at boot etc. I usually use rcmysql to stop and start the daemon on the fly.