in case i just type mysql -u root -p and enter my password i enter to my database but now i still get one message every time i say mysql and any option like this output
root@Dodge:~# mysql
Usage: /etc/init.d/mysql start|stop|restart|reload|force-reload|status
root@Dodge:~# mysql -u root
Usage: /etc/init.d/mysql start|stop|restart|reload|force-reload|status
root@Dodge:~# mysql -u root -p
Usage: /etc/init.d/mysql start|stop|restart|reload|force-reload|status
this message mean the service not running right ? but when i run status i get the services is active
root@Dodge:~# systemctl status mysql
● mariadb.service - MariaDB 10.5.9 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
Active: active (exited) since Thu 2021-05-13 10:33:27 EET; 16min ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Tasks: 0 (limit: 9337)
Memory: 0B
CPU: 0
CGroup: /system.slice/mariadb.service
root@Dodge:~# systemctl status mariadb
● mariadb.service - MariaDB 10.5.9 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
Active: active (exited) since Thu 2021-05-13 10:33:27 EET; 16min ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Tasks: 0 (limit: 9337)
Memory: 0B
CPU: 0
CGroup: /system.slice/mariadb.service
is active so why still give me
Usage: /etc/init.d/mysql start|stop|restart|reload|force-reload|status
i was try to uninstall every thin and re install it and install with secure & update my system - i use kali-linux Based on debian for many years and there's no problem with it .
Edit
When i run mysql status i get this logs in the bottom too
ay 13 11:15:37 Dodge mariadbd[14041]: 2021-05-13 11:15:37 3 [Warning] Access denied for user 'roo…rd: NO)
May 13 11:15:37 Dodge mariadbd[14041]: 2021-05-13 11:15:37 4 [Warning] Access denied for user 'roo…rd: NO)
May 13 11:15:37 Dodge /etc/mysql/debian-start[14065]: /usr/bin/mysql_upgrade: the '--basedir' option…nored
May 13 11:15:37 Dodge /etc/mysql/debian-start[14065]: Looking for 'mysql' as: /usr/bin/mysql
May 13 11:15:37 Dodge /etc/mysql/debian-start[14065]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
May 13 11:15:37 Dodge /etc/mysql/debian-start[14065]: Version check failed. Got the following error …lient
May 13 11:15:37 Dodge /etc/mysql/debian-start[14065]: ERROR 1045 (28000): Access denied for user 'ro…: NO)
May 13 11:15:37 Dodge /etc/mysql/debian-start[14065]: FATAL ERROR: Upgrade failed
May 13 11:15:37 Dodge mariadbd[14041]: 2021-05-13 11:15:37 5 [Warning] Access denied for user 'roo…rd: NO)
May 13 11:15:37 Dodge debian-start[14078]: ERROR 1045 (28000): Access denied for user 'root'@'local…d: NO)
Hint: Some lines were ellipsized, use -l to show in full.
type
and the commandwhich
help. You could also use the full pathname of the mysql client when running it.export PATH="/etc/init.d/:$PATH"
inside.bashrc
but ido that to run script direct with outfull path