I removed MySQL server and tried to install it once again on my system Lenny Debian
sudo apt-get install mysql-server
During the installation everything loaded OK until the connexion test phase that fails and the installation is stopped. In the error log file I found the next:
Trying to start service mysql... done
Trying to establish test connection... /usr/bin/mysql: error while loading shared libraries: libreadline.so.6: cannot open shared object file: No such file $
/usr/bin/mysql: error while loading shared libraries: libreadline.so.6: cannot open shared object file: No such file or directory
With ldd /usr/bin/mysql I got the following result:
/usr/bin/mysql: /lib/libc.so.6: version `GLIBC_2.14' not found (required by /usr/bin/mysql)
linux-vdso.so.1 => (0x00007fff170ea000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007fe39cfab000)
libreadline.so.6 => not found
libz.so.1 => /usr/lib/libz.so.1 (0x00007fe39cd94000)
libdl.so.2 => /lib/libdl.so.2 (0x00007fe39cb90000)
libm.so.6 => /lib/libm.so.6 (0x00007fe39c90d000)
libc.so.6 => /lib/libc.so.6 (0x00007fe39c5ba000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe39d1c7000)
How to install this missing library in order to restart the MySQL server installation?
Related
I'm trying to use Rails with the MySQL bin from Ampps, but when I run the command rails generate scaffold User name:string email:string I get the following error:
dyld: lazy symbol binding failed: Symbol not found: _mysql_server_init
Referenced from: /Users/myusername/.rvm/gems/ruby-2.2.1/gems/mysql2-0.4.2/lib/mysql2/mysql2.bundle
Expected in: flat namespace
dyld: Symbol not found: _mysql_server_init
Referenced from: /Users/myusername/.rvm/gems/ruby-2.2.1/gems/mysql2-0.4.2/lib/mysql2/mysql2.bundle
Expected in: flat namespace
I have already configured Ampps Mysql with my environment but I can not managed to make it work with rails, I have the following configurations.
$ which mysql
/Applications/AMPPS/mysql/bin/mysql
$ echo $PATH
/Users/myusername/.rvm/gems/ruby-2.2.1/bin:/Users/myusername/.rvm/gems/ruby-2.2.1#global/bin:/Users/myusername/.rvm/rubies/ruby-2.2.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/myusername/.rvm/gems/ruby-2.2.1/bin:/Users/myusername/.rvm/gems/ruby-2.2.1#global/bin:/Users/myusername/.rvm/rubies/ruby-2.2.1/bin:/Applications/AMPPS/php-5.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/myusername/.rvm/bin:/Users/myusername/.rvm/bin:/Applications/AMPPS/mysql/bin
$ ls -l /usr/local/lib/libmy*.dylib
lrwxr-xr-x 1 myusername admin 53 Jan 1 19:30 /usr/local/lib/libmysqlclient.18.dylib -> /Applications/AMPPS/mysql/lib/libmysqlclient.18.dylib
I have tried doing commands but with no success:
$ gem install mysql2 -- --with-mysql-lib=/Applications/AMPPS/mysql/lib --with-mysql-include=/Applications/AMPPS/mysql/include --with-mysql-config=/Applications/AMPPS/mysql/bin/mysql_config
And
bundle config build.mysql2 --with-mysql-lib=/Applications/AMPPS/mysql/lib --with-mysql-include=/Applications/AMPPS/mysql/include --with-mysql-config=/Applications/AMPPS/mysql/bin/mysql_config
bundle install
Any ideas?
I downloaded this AMPPS package and did a quick check on the MySQL binary:
$ file /Volumes/AMPPS/AMPPS/mysql/bin/mysql
/Volumes/AMPPS/AMPPS/mysql/bin/mysql: Mach-O executable i386
Your 64-bit Ruby install is trying to link to 32-bit MySQL libraries, and is not finding what it's looking for. "Symbol not found" errors are often an indication of an architecture mismatch.
My advice to you would be to install these programs from a package management system such as MacPorts or Homebrew. I'm partial to MacPorts, so I'll give you instructions for that. I get the impression Homebrew is more popular, but haven't used it myself.
Install Xcode and the Xcode Command Line Tools
Agree to Xcode license in Terminal: sudo xcodebuild -license
Install MacPorts: https://distfiles.macports.org/MacPorts/MacPorts-2.3.4-10.11-ElCapitan.pkg
Update the port list: sudo port selfupdate
Install away: sudo port install mysql56 rb-rails rb-mysql
Update regularly: sudo port selfupdate && sudo port -uc upgrade outdated
This way you're getting properly built binaries for your system, you can easily keep them up to date, and you aren't filling your system up with 2 gigabytes of things you aren't necessarily going to use (5 different versions of PHP, a couple of database servers, Perl, Python, etc.) In addition, you also get up-to-date versions of other utilities like Ruby, rather than relying on the outdated version that ships with the operating system.
I am trying to install cakePHP 3.0.0 with WT-NMP, but i got this message:
CakePHP is NOT able to connect to the database.
Database driver Cake\Database\Driver\Mysql cannot be used due to a
missing PHP extension or unmet dependency
my php.ini has this:
extension = php_bz2.dll
extension = php_curl.dll
extension = php_gd2.dll
extension = php_imap.dll
extension = php_mbstring.dll
extension = php_exif.dll
extension = php_mysql.dll
extension = php_mysqli.dll
extension = php_pdo_mysql.dll
extension = php_pdo.dll
extension = php_soap.dll
extension = php_sockets.dll
extension = php_sqlite3.dll
extension = php_openssl.dll
extension = php_fileinfo.dll
extension = php_intl.dll
the app.php has this
'default' => [
'className' => 'Cake\Database\Connection',
'driver' => 'Cake\Database\Driver\Mysql',
'persistent' => false,
'host' => 'localhost',
/**
* CakePHP will use the default DB port based on the driver selected
* MySQL on MAMP uses port 8889, MAMP users will want to uncomment
* the following line and set the port accordingly
*/
'port' => '3306',
'username' => 'root',
'password' => '',
'database' => 'test',
'encoding' => 'utf8',
'timezone' => 'UTC',
'cacheMetadata' => true,
What am I missing? or this is cakePHP 3.0 bug? OR anything to do with WT-NMP.
I have been stuck for whole day.
Solved this by luck!:
extension = php_intl.dll
extension = php_pdo_mysql.dll
intl.default_locale = en_utf8
intl.error_level = E_WARNING
Installing the modules for MySQL database connections solved it for me:
#Install the package
sudo apt-get install php5-mysql
#Restart Apache
sudo service apache2 restart
Source: http://guru4cakephp.blogspot.nl/2015/04/install-cakephp-3-on-ubuntu.html
Package details: https://packages.debian.org/sid/php5-mysql
Try this:
For PHP 7.0
sudo apt-get install php7.0-mysql
For PHP 5:
sudo apt-get install php5-mysql
The error message is because of extension = php_pdo_mysql.dll not being installed and enabled in php.ini. If you don't have php_intl.dll enabled you will get an error before checking the database connection.
Your php.ini indicates that you have got php_pdo_mysql.dll enabled, however it may have been that you needed to restart the CakePHP server bin/cake server.
Don't just depend on the php.ini reading. Just check if you have installed php[v]-mysql extension. You can check if php_mysql.dll exist in the php extension directory(most probably <path to your php installation>/ext) in your windows based server. In linux you can use the following command check if it is installed.
yum list installed | grep php
It will list down all the php extensions installed.
I have no 10 reputation so couldnt add images, sorry.
I want Laravel 4.2.0 working on my Ubuntu 14.04.2 LTS Server.
What I have done until now:
Installing Ubuntu 14.04.2
sudo apt-get install apache2
sudo apt-get install mysql-server
Install Openssl
Install libmcrypt
Install PHP by
./configure --with-openssl --with-mcrypt --enable-mbstring --with-pdo-mysql --enable-pdo --with-mysql
make
make install
Download Laravel 4.2.0 zip file from GitHub, unzip and transfer it through WinSCP
Install Laravel 4.2.0 by
curl -sS https://getcomposer.org/installer | php
php composer.phar install
Database connection by configuring /app/config/database.php
'mysql' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'laravel',
'username' => 'laravel-user',
'password' => '************',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
),
And I got this error.
PDOException
could not find driver
Open: /var/www/laravel/laravel/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php
*/
public function createConnection($dsn, array $config, array $options)
{
$username = array_get($config, 'username');
$password = array_get($config, 'password');
return new PDO($dsn, $username, $password, $options);
}
I don't know what to do.
I have googled for a day, and got no answer. Please help me.
I checked theres PDO enabled with php -i|grep PDO command.
Result:
PDO support => enabled
PDO drivers => sqlite, mysql
PDO Drivers for MySQL => enabled
PDO Drivers for SQLite 3.x => enabled
But I checked php.ini, there's no line like extension=pdo.so
So I added the lines like this
[Pdo]
; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off"
; http://php.net/pdo-odbc.connection-pooling
;pdo_odbc.connection_pooling=strict
;pdo_odbc.db2_instance_name
[Pdo_mysql]
; If mysqlnd is used: Number of cache slots for the internal result set cache
; http://php.net/pdo_mysql.cache_size
pdo_mysql.cache_size = 2000
; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
; http://php.net/pdo_mysql.default-socket
pdo_mysql.default_socket=
extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
Please help me out of this frustrating situation..
Thank you in advance for helping me.
That's means you haven't the extenstion installed.
Install it using:
sudo apt-get install phpx.x-mysql
where x.x is your php version ex: php5.6-mysql
OR just try:
sudo apt-get install php-mysql
I'm making my live easier (I hope) by learning to use puppet and vagrant.
I already know how to work with Vagrant but want to make a configuration that out of the box has everything set-up to start. So I thought to use Puppet.
I used the tutorial at http://jamesmcfadden.co.uk/using-vagrant-and-puppet-to-build-a-php-nginx-and-mysql-environment/ but can't seem to figure out how to start MySQL.
Running Ubuntu 14.04LTS my init.pp for MySQL is
class mysql {
# Install mysql
package { ['mysql-server']:
ensure => present,
require => Exec['apt-get update'],
}
# Run mysql
service { 'mysql':
ensure => running,
require => Package['mysql-server'],
}
# Use a custom mysql configuration file
file { '/etc/mysql/my.cnf':
source => 'puppet:///modules/mysql/my.cnf',
require => Package['mysql-server'],
notify => Service['mysql'],
}
# We set the root password here
exec { 'set-mysql-password':
unless => 'mysqladmin -uroot -proot status',
command => "mysqladmin -uroot password a9120ed2b58af37862a83f5b9f850819ed08b2a9",
path => ['/bin', '/usr/bin'],
require => Service['mysql'];
}
}
But this gives me an error that mysql is not found.
err: /Stage[main]/Mysql/Service[mysql]/ensure: change from stopped to running fa
iled: Could not start Service[mysql]: Execution of '/sbin/start mysql' returned
1: at /tmp/vagrant-puppet-2/modules-0/mysql/manifests/init.pp:13
And changing it to mysqld (note the 'd') this message is gone but there are problems coming up with the dependencies that can't be found to check if mysql is running (after changing them to 'Service['mysqld']':
err: /Stage[main]/Mysql/Service[mysqld]: Could not evaluate: Could not find init
script or upstart conf file for 'mysqld'
Were am I doing it wrong?
your script has the below lines:
require => Exec['apt-get update'],
but don't define the 'Exec'. Add following lines:
exec { 'apt-get update':
command => 'sudo apt-get update',
path => ['/bin', '/usr/bin'],
}
Should work fine afterward.
Do not try to write your own MySQL module. Please use officially supported puppet MySQL module. To install it call:
puppet module install puppetlabs-mysql
Generally, if you want to install/manage some application by puppet, first check if on puppet forge exist dedicated module.
I got error while installing redmine on ubuntu 14.04. I don't understand why I get this error.
Below is are stack I get
apt-get install redmine redmine-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
redmine is already the newest version.
redmine-mysql is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up redmine (2.4.2-1) ...
dbconfig-common: writing config to /etc/dbconfig-common/redmine/instances/defaul
t.conf
Creating config file /etc/redmine/default/database.yml.new with new version
granting access to database redmine_default for redmine_default#localhost: alrea
dy exists.
creating database redmine_default: already exists.
dbconfig-common: flushing administrative password
Replacing config file /etc/redmine/default/session.yml with new version
A new secret session key has been generated in /etc/redmine/default/session.yml
Populating database for redmine instance "default".
This may take a while.
rake aborted!
Server is running in --secure-auth mode, but 'redmine_default'#'localhost' has a
password in the old format; please change the password to the new format
/var/lib/gems/1.9.1/gems/mysql2-0.3.16/lib/mysql2/client.rb:70:in `connect'
/var/lib/gems/1.9.1/gems/mysql2-0.3.16/lib/mysql2/client.rb:70:in `initialize'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
Error when running rake db:migrate, check database configuration.
dpkg: error processing package redmine (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
redmine
E: Sub-process /usr/bin/dpkg returned an error code (1)
Errors were encountered while processing: redmine
E: Sub-process /usr/bin/dpkg returned an error code (1)`
Following is output of command dpkg -l redmine
`Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
iF redmine 2.4.2-1 all flexible project management web a`
Rails version install on my machine
rails -v
Rails 4.1.4
Ruby version install on my machine
ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
apache2 version
`apache2 -v
Server version: Apache/2.4.7 (Ubuntu)
Server built: Apr 3 2014 12:20:28`
I am new to ubuntu and also linux. Can anyone identify why I get this error ?
The problem is the way the password is being passed to the MySQL server.
You can set secure_auth: true in the database.yml file right under where the password is specified to use the appropriate format.
Alternatively, you could disable secure auth in the mysql daemon config and restart.