MySQL Server 8.0.12 - An authentication plugin must be specified for new users - mysql

I am trying to install MySQL Server (on Windows) using MYSQL community edition v8.0.12 in silent mode.
I first run
msiexec /i "mysql-installer-community-8.0.12.0.msi" /qn
Then
MySQLInstallerConsole community install -silent server;8.0.12;x64:*:type=config;
openfirewall=true;generallog=true;binlog=true;serverid=3306;enable_tcpip=true;port=3306;
rootpasswd=Unkn0wN;installdir="C:\MySQL\MySQL Server 8.0":type=user;username=foo;
password=bar;role=DBManager
MySQLInstallerConsole.exe execution log:
=================== Start Initialization ===================
MySQL Installer is running in Community mode
Attempting to update manifest.
Initializing product requirements
Loading product catalog
Checking for product catalog snippets
Checking for product packages in the bundle
Categorizing product catalog
Finding all installed packages.
Your product catalog was last updated at 9/16/2018 5:20:01 PM
=================== End Initialization ===================
MySQL Server 8.0.12 - An authentication plugin must be specified for new users.
The error is: "MySQL Server 8.0.12 - An authentication plugin must be specified for new users."
Oracle doesn't seem to have updated the MySQLInstallerConsole reference parameters on its website, does anyone know how i can specify an auth plugin for MySQLInstallerConsole ?
For now i am just working around it by not creating user foo.
MySQLInstallerConsole community install -silent server;8.0.12;x64:*:type=config;
openfirewall=true;generallog=true;binlog=true;serverid=3306;enable_tcpip=true;port=3306;
rootpasswd=Unkn0wN;installdir="C:\MySQL\MySQL Server 8.0";datadir="C:\MySQL\data"

I discovered that using the auth_plugin setting with caching_sha2_password allowed for creating a user.
As of MySQL 8.0, caching_sha2_password is both the preferred and the default authentication plugin.
MySQLInstallerConsole community install -silent server;8.0.21;x64:*:^
type=config;openfirewall=false;generallog=true;binlog=true;^
serverid=3306;enable_tcpip=true;port=3306;rootpasswd=Unkn0wN;^
installdir="C:\MySQL\MySQL80";datadir="C:\MySQL\Data":^
type=user;username=foo;password=bar;role=DBManager;auth_plugin=caching_sha2_password
I've also been successful at installing other products like so
MySQLInstallerConsole community install -silent ^
workbench;8.0.21;x64:* ^
shell;8.0.21;x64:* ^
connector/ODBC;8.0.21;x64:* ^
connector/J;8.0.21;x86:* ^
connector/C++;8.0.21;x64:* ^
connector/NET;8.0.21;x86:*
Some references:
https://dev.mysql.com/doc/refman/8.0/en/authentication-plugins.html
https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password

Related

ejabberd 19.05 not working with mod_log_chat

installed ejabberd от FreeBSD
then install mod_log_chat (ejabberdctl modules_update_specs -> ejabberdctl module_install mod_log_chat) and see error when starting ejabberd:
[error] Supervisor ejabberd_sup had child ejabberd_gen_mod_sup started with gen_mod:start_link() at undefined exit with reason {'EXIT',{undef,[{econf,any,[],[]},{mod_log_chat,mod_opt_type,1,[{file,"/root/.ejabberd-modules/sources/ejabberd-contrib/mod_log_chat/src/mod_log_chat.erl"},{line,282}]},{gen_mod,'-get_validators/2-fun-1-',3,[{file,"src/gen_mod.erl"},{line,512}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{gen_mod,get_validators,2,[{file,"src/gen_mod.erl"},{line,499}]},{gen_mod,validate_opts,3,[{file,"src/gen_mod.erl"},{line,557}]},{gen_mod,start_module,5,[{file,"src/gen_mod.erl"},{line,209}]},{lists,foreach,...}]}} in context start_error
02:36:32.939 [critical] Failed to start ejabberd application: {error,{shutdown,{failed_to_start_child,ejabberd_gen_mod_sup,{'EXIT',{undef,[{econf,any,[],[]},{mod_log_chat,mod_opt_type,1,[{file,"/root/.ejabberd-modules/sources/ejabberd-contrib/mod_log_chat/src/mod_log_chat.erl"},{line,282}]},{gen_mod,'-get_validators/2-fun-1-',3,[{file,"src/gen_mod.erl"},{line,512}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{gen_mod,get_validators,2,[{file,"src/gen_mod.erl"},{line,499}]},{gen_mod,validate_opts,3,[{file,"src/gen_mod.erl"},{line,557}]},{gen_mod,start_module,5,[{file,"src/gen_mod.erl"},{line,209}]},{lists,foreach,2,[{file,"lists.erl"},{line,1338}]}]}}}}}
Right, mod_log_chat requires ejabberd 19.08 or higher since this commit: https://github.com/processone/ejabberd-contrib/commit/857d350a7119d63fc85555cc66df7ff923b91e39
That was not documented in the module README.txt file...
You have two solutions:
Upgrade your ejabberd 19.05 to 19.08 or higher
or Downgrade your mod_log_chat source code to a version older than the mentioned one.

PDO Exception : Could not find driver. [duplicate]

Does the MySQL-server and PHP5-MySQLi version have to match in order for a connection to be possible? I'm currently receiving the error below: I am running BSD.
"Fatal error: Uncaught exception 'PDOException' with message 'could not find driver'..."
Here is the the connection info:
$info = "mysql:dbname=myDB;host=localhost";
$user = "dbUser";
$pw = "somePW";
return(new PDO($info, $user, $pw));
Here is my MySQL information:
mysql-server-5.5.24
php5-mysqli-5.4.3
I had this same issue on my CentOS install. I had tried to install imagick and hosed my install. When I removed all of my php files and reinstalled something wasn't working right.
I ran:
yum install php-pdo
yum install php-pdo_mysql
After doing those two lines I ran
service httpd restart
and everything came back up and running.
PDO uses database specific drivers to connect to database systems. It looks like you are missing the pdo_mysql driver that is required to connect to a MySQL database. There is some details on installing the driver on the pdo_mysql manual page, or there may be a BSD package that you can use (I am afraid I'm not familiar enough with BSD to offer specific advice).
Thanks to zerkms and John C for pointing me in the right direction. Below are the commands I used to install the driver:
#cd /usr/ports/databases/php5-pdo_mysql
#make install clean
#apachectl restart

MySQL use openSSL / Enterprise Encryption

I'm triing to install the MySQL enterprise plugin openssl_udf. I need it for generating RSA keys and RSA encryption. I got the openssl_udf.dll from Oracle and tried the following codes with failures.
INSTALL PLUGIN openssl_udf SONAME 'openssl_udf.dll'
Failure:
Error Code: 1126. Can't open shared library 'C:\Program Files\MySQL\MySQL Server 5.7\lib\plugin\openssl_udf.dll'
And:
CREATE FUNCTION asymmetric_decrypt RETURNS STRING
SONAME 'openssl_udf.dll';
Failure:
Error Code: 1126. Can't open shared library 'openssl_udf.dll' (errno: 193 )
Does someone know how to use it?
Sources:
https://dev.mysql.com/doc/refman/5.7/en/install-plugin.html
http://dev.mysql.com/doc/refman/5.7/en/enterprise-encryption-installation.html
So it was simple after all.
After deinstalling MySQL Server (Community) the first time, I didn't delete ALL MySQL files and folders manually, so that the Enterprise installer must have installed the Community distribution again. After deinstalling and removing all files and than reinstalling, everything works fine.

mariadb odbc throws invalid pointer error

I have MariaDB installed (as part of Fedora installation) on Fedora 21. ODBC is also installed. BUT, when I go to test the ODBC configuration (or when Asterisk attempts to use ODBC) I get an error in free():invalid pointer.
odbcinst.ini
[MySQL]
Description=ODBC for MySQL
Driver=/usr/lib64/libmyodbc5.so
Setup=/usr/lib64/libodbcmyS.so
FileUsage=1
UsageCount=2
odbc.ini
[asterisk]
Description=MySQL connection to 'asterisk' database
Driver=MySQL
Database=asteriskdb
Server=localhost
UserName=<theusername>
Password=<thepassword>
Port=3306
Socket=/var/lib/mysql/mysql.sock
Connecting to the database using mysql works perfectly fine using these credentials. But doing:
echo "select 1"|isql -v asterisk theusername thepassword
results in this:
*** Error in `isql': free(): invalid pointer: 0x00000000011c4e58 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7850e)[0x7fdd0ef7850e]
/lib64/libc.so.6(cfree+0x5b5)[0x7fdd0ef84165]
/usr/lib64/libmyodbc5.so(MySQLGetPrivateProfileStringW+0x132)[0x7fdd083381c2]
/usr/lib64/libmyodbc5.so(ds_lookup+0x5d)[0x7fdd08336c3d]
/usr/lib64/libmyodbc5.so(MySQLConnect+0xbe)[0x7fdd08316a1e]
/lib64/libodbc.so.2(SQLConnect+0x9e5)[0x7fdd0fb41745]
isql[0x402908]
/lib64/libc.so.6(__libc_start_main+0xf0)[0x7fdd0ef1ffe0]
isql[0x402c31]
======= Memory map: ========
I can provide the rest of the core dump if it will help anyone.
Any suggestions for what is causing this and how to prevent it? I need ODBC working.
I had the same problem on my F21 86_64.
The resolution for me was to install a newer version (logged in as root):
1 remove actual odbc-version (5.2.2 if I remember well)
yum remove mysql-connector-odbc
2 Searching the newest version of mysql-connector-odbc-5.3.4-1.x86_64.rpm) at:
http://dev.mysql.com/get/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.4-1.x86_64.rpm (you need to subscribe)
yum localinstall --nogpgcheck mysql-connector-odbc-5.3.4-1.x86_64.rpm
3 symbolic link creation because unixODBC points still to
/usr/lib64/libmyodbc5.so instead of /usr/lib64/libmyodbc5w.so
ln -s /usr/lib64/libmyodbc5w.so /usr/lib64/libmyodbc5.so
4 if needed don't forget to modify (in ~/.odbc.ini)
.....
Driver64=/usr/lib64/libmyodbc5w.so
....
Hope this helps
Roman

Error Installing mySQL on mac yosamite

I'm getting the following error from the installer while trying to install mysql on mac yosamite.
"The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for further assistance"
Please see below for the steps:
1. Downloaded the dmg from: http://dev.mysql.com/downloads/mysql/
2. ran the package - followed the steps and towards the very end getting this error
Please see below the installer log:
Oct 19 12:41:05 Srikanths-MBP installd[963]: PackageKit: ----- Begin install -----
Oct 19 12:41:21 Srikanths-MBP installd[963]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “mysql-5.6.21-osx10.8-x86_64.pkg”." UserInfo=0x7fb13e253ad0 {NSFilePath=./postinstall, NSURL=file://localhost/Volumes/mysql-5.6.21-osx10.8-x86_64/mysql-5.6.21-osx10.8-x86_64.pkg#mysql-startup-item.pkg, PKInstallPackageIdentifier=com.mysql.startupitem, NSLocalizedDescription=An error occurred while running scripts from the package “mysql-5.6.21-osx10.8-x86_64.pkg”.} {
NSFilePath = "./postinstall";
NSLocalizedDescription = "An error occurred while running scripts from the package \U201cmysql-5.6.21-osx10.8-x86_64.pkg\U201d.";
NSURL = "file://localhost/Volumes/mysql-5.6.21-osx10.8-x86_64/mysql-5.6.21-osx10.8-x86_64.pkg#mysql-startup-item.pkg";
PKInstallPackageIdentifier = "com.mysql.startupitem";
}
Oct 19 12:41:21 Srikanths-MBP Installer[1168]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.
Oct 19 12:41:21 Srikanths-MBP Installer[1168]: Displaying 'Install Failed' UI.
Oct 19 12:41:21 Srikanths-MBP Installer[1168]: 'Install Failed' UI displayed message:'The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.'.
Please help ! as I'm new to DBs.
I fixed this problem by choosing "Customized Install" after accepting the license agreement, then disabling the 'Startup' item (third in the list). I left the Preferences option checked. It might be something with folder permissions and having your users folder in a non-default location, as I currently have my users folder placed on a volume that is NOT the boot volume.
It seems that the Startup item is causing the error. I removed it from preferences and the installation worked.
When you start the package installation of MySQL 5.6.21 (latest release compatible with OSX 10.9), after accepting the various form, choose Ad Hoc installation and remove the panel from the installation preferences and Startup items. So it works =)