qt-cmake: command not found
-
Hello,
I wanted to use MySQL driver for my Qt app. I went to the official installation guide and followed the steps but on first command i got the error that qt-cmake: command not found. I am running Qt 6 on a ubuntu 22.04 and use QtCreator.
Here is the guide:
https://doc.qt.io/qt-6/sql-driver.html#qmysqlWhat am I missing?
-
@jsulm said in qt-cmake: command not found:
@MH24 If on Linux simply use cmake instead of qt-cmake
Turns out I am using Qt 5 and not 6. My mistake.
However, this has produced a new problem. From here: https://doc.qt.io/qt-5/sql-driver.html#qmysql
There is nomysql-devel package
. I foundmysql-client
but when I checked/usr/lib/x86_64-linux-gnu
there is nolibmysqlclient.so
.
If you could kindly guide me on that. Thank you. -
@jsulm said in qt-cmake: command not found:
@MH24 My Xubuntu 20.04 has libmysqlclient-dev
Yes I installed it and now I found the
libmysqlclient.so
in/usr/lib/x86_64-linux-gnu
.
I copied it to/usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers
Thats where thelibsqlite.so
was found but when I run my code it says:QSqlDatabase: QMySQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMARIADB QMYSQL QMYSQL3 QSqlQuery::exec: database not open
I think I am nearly there and frantically searching old threads but cant put my finger on it. Thank you again for your valuable time.
qtdiag
gave me this:Qt 5.15.3 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 11.3.0) on "xcb" OS: Ubuntu 22.04.2 LTS [linux version 5.19.0-35-generic] Architecture: x86_64; features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2 Environment: Features: QT_NO_EXCEPTIONS Library info: PrefixPath: /usr DocumentationPath: /usr/share/qt5/doc HeadersPath: /usr/include/x86_64-linux-gnu/qt5 LibrariesPath: /usr/lib/x86_64-linux-gnu LibraryExecutablesPath: /usr/lib/x86_64-linux-gnu/qt5/libexec BinariesPath: /usr/lib/qt5/bin PluginsPath: /usr/lib/x86_64-linux-gnu/qt5/plugins ImportsPath: /usr/lib/x86_64-linux-gnu/qt5/imports Qml2ImportsPath: /usr/lib/x86_64-linux-gnu/qt5/qml ArchDataPath: /usr/lib/x86_64-linux-gnu/qt5 DataPath: /usr/share/qt5 TranslationsPath: /usr/share/qt5/translations ExamplesPath: /usr/lib/x86_64-linux-gnu/qt5/examples TestsPath: /usr/tests SettingsPath: /etc/xdg
I could not find any folder
cd $QTDIR/qtbase/src/plugins/sqldrivers
.
sqldrivers
folder was in/usr/lib/x86_64-linux-gnu/qt5/plugins/
as I said above.
When Icd
into that and runqmake -- MYSQL_PREFIX=/usr/local
as in the documentation I get this:Usage: /usr/lib/qt5/bin/qmake [mode] [options] [files] QMake has two modes, one mode for generating project files based on some heuristics, and the other for generating makefiles. Normally you shouldn't need to specify a mode, as makefile generation is the default mode for qmake, but you may use this to test qmake on an existing project Mode: ......
-
@MH24 said in qt-cmake: command not found:
I copied it to /usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers
This is not needed.
To find out what is wrong set QT_DEBUG_PLUGINS before executing your app and check the output. See https://doc.qt.io/qt-6/debug.html
-
@jsulm said in qt-cmake: command not found:
QT_DEBUG_PLUGINS
Yes I set it to 1 from 'projects'.
I got this when I hit ' Start debugging of startup project':15:53:54: Starting /home/developer/Qt-Work/build-UniAppMain-Desktop-Debug/UniAppMain... QSqlDatabase: QMySQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMARIADB QMYSQL QMYSQL3 QSqlQuery::exec: database not open In Main with ID: 52428806 15:53:56: /home/developer/Qt-Work/build-UniAppMain-Desktop-Debug/UniAppMain exited with code 0 15:56:25: Starting /home/developer/Qt-Work/build-UniAppMain-Desktop-Debug/UniAppMain... QSqlDatabase: QMySQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMARIADB QMYSQL QMYSQL3 QSqlQuery::exec: database not open In Main with ID: 52428806 15:56:31: /home/developer/Qt-Work/build-UniAppMain-Desktop-Debug/UniAppMain exited with code 0 15:57:18: Starting /home/developer/Qt-Work/build-UniAppMain-Desktop-Debug/UniAppMain... QSqlDatabase: QMySQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMARIADB QMYSQL QMYSQL3 QSqlQuery::exec: database not open In Main with ID: 52428806 15:57:21: /home/developer/Qt-Work/build-UniAppMain-Desktop-Debug/UniAppMain exited with code 0 15:57:44: Debugging /home/developer/Qt-Work/build-UniAppMain-Desktop-Debug/UniAppMain ... QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqeglfs.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqeglfs.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "eglfs" ] }, "archreq": 0, "className": "QEglFSIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("eglfs") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "linuxfb" ] }, "archreq": 0, "className": "QLinuxFbIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("linuxfb") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "archreq": 0, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("minimal") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimalegl" ] }, "archreq": 0, "className": "QMinimalEglIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("minimalegl") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "archreq": 0, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("offscreen") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "vnc" ] }, "archreq": 0, "className": "QVncIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("vnc") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "xcb" ] }, "archreq": 0, "className": "QXcbIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("xcb") QFactoryLoader::QFactoryLoader() checking directory path "/home/developer/Qt-Work/build-UniAppMain-Desktop-Debug/platforms" ... loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so" loaded library "Xcursor" QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes" ... QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/libqgtk3.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/libqgtk3.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1", "MetaData": { "Keys": [ "gtk3" ] }, "archreq": 0, "className": "QGtk3ThemePlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("gtk3") QFactoryLoader::QFactoryLoader() checking directory path "/home/developer/Qt-Work/build-UniAppMain-Desktop-Debug/platformthemes" ... loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/libqgtk3.so" QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts" ... QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so, metadata= { "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1", "MetaData": { "Keys": [ "compose", "xim" ] }, "archreq": 0, "className": "QComposePlatformInputContextPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("compose", "xim") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so, metadata= { "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1", "MetaData": { "Keys": [ "ibus" ] }, "archreq": 0, "className": "QIbusPlatformInputContextPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("ibus") QFactoryLoader::QFactoryLoader() checking directory path "/home/developer/Qt-Work/build-UniAppMain-Desktop-Debug/platforminputcontexts" ... loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so" QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/styles" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/developer/Qt-Work/build-UniAppMain-Desktop-Debug/styles" ... QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/iconengines" ... QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/iconengines/libqsvgicon.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/iconengines/libqsvgicon.so, metadata= { "IID": "org.qt-project.Qt.QIconEngineFactoryInterface", "MetaData": { "Keys": [ "svg", "svgz", "svg.gz" ] }, "archreq": 0, "className": "QSvgIconPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("svg", "svgz", "svg.gz") QFactoryLoader::QFactoryLoader() checking directory path "/home/developer/Qt-Work/build-UniAppMain-Desktop-Debug/iconengines" ... QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats" ... QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats/libqgif.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats/libqgif.so, metadata= { "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface", "MetaData": { "Keys": [ "gif" ], "MimeTypes": [ "image/gif" ] }, "archreq": 0, "className": "QGifPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("gif") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats/libqico.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats/libqico.so, metadata= { "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface", "MetaData": { "Keys": [ "ico", "cur" ], "MimeTypes": [ "image/vnd.microsoft.icon", "image/vnd.microsoft.icon" ] }, "archreq": 0, "className": "QICOPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("ico", "cur") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats/libqjpeg.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats/libqjpeg.so, metadata= { "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface", "MetaData": { "Keys": [ "jpg", "jpeg" ], "MimeTypes": [ "image/jpeg", "image/jpeg" ] }, "archreq": 0, "className": "QJpegPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("jpg", "jpeg") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats/libqsvg.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats/libqsvg.so, metadata= { "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface", "MetaData": { "Keys": [ "svg", "svgz" ], "MimeTypes": [ "image/svg+xml", "image/svg+xml-compressed" ] }, "archreq": 0, "className": "QSvgPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("svg", "svgz") QFactoryLoader::QFactoryLoader() checking directory path "/home/developer/Qt-Work/build-UniAppMain-Desktop-Debug/imageformats" ... loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats/libqgif.so" loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats/libqico.so" loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats/libqjpeg.so" loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats/libqsvg.so" QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers" ... QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers/libmysqlclient.so" "Failed to extract plugin meta data from '/usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers/libmysqlclient.so'" not a plugin QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers/libqsqlite.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers/libqsqlite.so, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QSQLITE" ] }, "archreq": 0, "className": "QSQLiteDriverPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("QSQLITE") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers/libqsqlmysql.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers/libqsqlmysql.so, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QMYSQL3", "QMYSQL", "QMARIADB" ] }, "archreq": 0, "className": "QMYSQLDriverPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("QMYSQL3", "QMYSQL", "QMARIADB") QFactoryLoader::QFactoryLoader() checking directory path "/home/developer/Qt-Work/build-UniAppMain-Desktop-Debug/sqldrivers" ... loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers/libqsqlmysql.so" QSqlDatabase: QMySQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMARIADB QMYSQL QMYSQL3 QSqlQuery::exec: database not open QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations" ... QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-egl-integration.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-egl-integration.so, metadata= { "IID": "org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5", "MetaData": { "Keys": [ "xcb_egl" ] }, "archreq": 0, "className": "QXcbEglIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("xcb_egl") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so, metadata= { "IID": "org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5", "MetaData": { "Keys": [ "xcb_glx" ] }, "archreq": 0, "className": "QXcbGlxIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("xcb_glx") QFactoryLoader::QFactoryLoader() checking directory path "/home/developer/Qt-Work/build-UniAppMain-Desktop-Debug/xcbglintegrations" ... loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so" QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/accessible" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/developer/Qt-Work/build-UniAppMain-Desktop-Debug/accessible" ... In Main with ID: 52428806 QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/accessiblebridge" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/developer/Qt-Work/build-UniAppMain-Desktop-Debug/accessiblebridge" ...
Completely lost here. Why doesn't the qmake command work for me as stated in docs?
-
@MH24
I don't know what qmake has to do with anything when you are showing your executable built and running.You do not show your
addDatabase()
call from your code so we can see you trying to use the MySQL driver. But:QSqlDatabase: QMySQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMARIADB QMYSQL QMYSQL3
So did you at least try with
QMYSQL
notQMySQL
? -
@JonB said in qt-cmake: command not found:
@MH24
I don't know what qmake has to do with anything when you are showing your executable built and running.You do not show your
addDatabase()
call from your code so we can see you trying to use the MySQL driver. But:QSqlDatabase: QMySQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMARIADB QMYSQL QMYSQL3
So did you at least try with
QMYSQL
notQMySQL
?Well,
qmake
was mentioned in the official docs for Qt5 driver installation.Yes, my mistake was that after I had moved the drivers' shared objects to the sqldriver folder I had written
QMySQL
instead ofQMYSQL
in my code copied from official docs. However, my database is not open so I dont know whether the driver worksThis is my code:
#include <QSqlDatabase> #include <QSql> #include <QSqlQueryModel> #include <QSqlQuery> #include <QSqlError> #include <QSqlDriver> //class declaration, rest of the functions etc QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL"); db.setHostName("localhost"); db.setDatabaseName("uniapp"); db.setUserName("root"); db.setPassword("******"); bool ok = db.open(); QSqlQuery query; query.exec("INSERT INTO employee (id, name)" "VALUES (1001, 'XYZ')");
This gives
QSqlQuery::exec: database not open
.
If I remove the lines of query from the code there is no error even if I give wrong password etc.
Apologies if this thread has diverted, but I need to be sure Qt is connecting to my MySQL database.
I have the server running on my machine withmysql -u root -p
andSHOW DATABASES;
shows my database. -
@MH24 said in qt-cmake: command not found:
bool ok = db.open();
This gives
QSqlQuery::exec: database not open.
You are supposed to test the
ok
result, else what is the point of assigning it?Presumably it is returning false, hence the error message. In which case what does
db.lastError()
return, as per the documentation? -
@JonB said in qt-cmake: command not found:
@MH24 said in qt-cmake: command not found:
bool ok = db.open();
This gives
QSqlQuery::exec: database not open.
You are supposed to test the
ok
result, else what is the point of assigning it?Presumably it is returning false, hence the error message. In which case what does
db.lastError()
return, as per the documentation?It returns this:
QSqlError("1698", "QMYSQL: Unable to connect", "Access denied for user 'root'@'localhost'")
-
@MH24
So that is your answer. I think that indicates the QMYSQL driver from Qt is working OK. I am also guessing this is not an incorrect password issue, I assume that would give a different message (though I cannot be sure).You might try a database other than
uniapp
, such asmysql
orinformation_schema
, to see whether that alters the situation. -
@MH24 said in qt-cmake: command not found:
Access denied for user 'root'@'localhost'
Very obvoius where the problem is - the user root@localhost has no access rights to this database (and imo never should have access)
-
@JonB
I tried using different database but same error. I tried granting privileges to the database using
grant all privileges on user_database.* to user_user@'localhost' ; grant all privileges on user_database.* to user_user@'%' ;
but to no avail.
-
@MH24
It vaguely, vaguely rings a bell that you have to do something special aboutroot
, possibly to do with how MySQL gets installed initially. Lots of hits for Googlingmysql root localhost permission
. I may have done the stuff mentioned in https://stackoverflow.com/a/46908573 in the past. (Be careful you don't lock yourself out, however!)But in any case what you have done now is better, as @Christian-Ehrlicher said you should not be using
root
user for your application.