Infobright installation is unable to use mysql user - mysql

When trying to install Infobright, no matter what I try, it says it can't use the mysql-user.
If I try it with the dpkg -i infobright-4.0.7-0-i686-ice.deb, the log contains the following problems:
11:48:16 Installing infobright 4.0.7-0 (i686)
11:48:16 The installer will generate /tmp/ib4.0.7-0-install.log install trace log.
11:48:16 [step: pre (4.0.7-0, 1=upgrade)]
11:48:16 build type: static
11:48:19 [step: postun (4.0.7-0), 1=upgrade]
11:48:19 [step: post (4.0.7-0), 1=configure]
11:48:19 Install with RPM_INSTALL_PREFIX=/usr/local, current prefix=/usr/local/infobright, prefix_actual=/usr/local/infobright-4.0.7-i686
11:48:19 upgrade=
11:48:19 Config file /etc/my-ib.cnf created
11:48:19 sed -e 's+#BH_PORT#+5029+' -e 's+#BH_BASEDIR#+/usr/local/infobright-4.0.7-i686+' -e 's+#BH_SOCK#+/tmp/mysql-ib.sock+' -e 's+#BH_DATADIR#+/usr/local/infobright-4.0.7-i686/data+' < /usr/local/infobright-4.0.7-i686/support-files/my-ib-master.cnf.in > /etc/my-ib-master.cnf
11:48:19 sed -e 's+#BH_PORT#+5029+' -e 's+#BH_BASEDIR#+/usr/local/infobright-4.0.7-i686+' -e 's+#BH_SOCK#+/tmp/mysql-ib.sock+' -e 's+#BH_DATADIR#+/usr/local/infobright-4.0.7-i686/data+' < /usr/local/infobright-4.0.7-i686/support-files/my-ib-slave.cnf.in > /etc/my-ib-slave.cnf
11:48:19 Creating/Updating datadir and cachedir
11:48:19 Creating user mysql and group mysql
groupadd: Gruppe »mysql« existiert bereits.
useradd: Benutzer »mysql« existiert bereits
usermod: Keine Änderungen
11:48:19 Installing default databases
140902 11:48:19 [ERROR] Fatal error: Can't change to run as user 'mysql' ; Please check that the user exists!
140902 11:48:19 [ERROR] Aborting
140902 11:48:19 [Note] /usr/local/infobright-4.0.7-i686/bin/mysqld: Shutdown complete
11:48:19 =============ERROR=======================
11:48:19 Failed on infobright initialization. You can investigate /tmp/ib4.0.7-0-install.log and log files from /usr/local/infobright-4.0.7-i686/data.
11:48:19 At this stage the current installation may be broken. You need to uninstall it and
11:48:19 fix the cause before retrying the installation.
11:48:19 Possible reasons for the failure are: LDAP service is running or
11:48:19 system has unsupported glibc but nscd service is not running.
11:48:19 Possible work arounds are: If LDAP is running, you may stop LDAP service prior to the installation.
11:48:19 If you have unsupported glibc, you need to start nscd service prior to the installation.
11:48:19 =========================================
Unforunately, something similiar happens when I try to install it from the tarball - everytime, the error 140902 11:48:19 [ERROR] Fatal error: Can't change to run as user 'mysql' ; Please check that the user exists! appears and the installation can't be finished.
In Infobright startup error: Fatal error:, someone seems to have a similiar error but does not realy pose the question. Does anyone know, how to solve this problem?
Another, unrelated error seems to be http://blog.oneiroi.co.uk/linux/mysql/cant-change-to-run-as-user-mysql-please-check-that-the-user-exists/: Here, someone says I need to add the mysql-user. But I checked it, and the user exists an I am able to do something as this user. So unfortunately, I can't see any way to solve this problem.

You may use CentOS 6.2 or higher, which has a higher glibc version(2.12).
Compiling from source seems to be the only option. Tried that and got it working. We need to set
export LD_LIBRARY_PATH=/usr/local/boost_1_42_0/lib
before running the command
bin/mysql_install_db --defaults-file=/etc/my-ib.cnf --user=mysql
ICE Server is now up and running, and am able to login to the client as well. Only the /etc/init.d/mysqd-ib file is missing. Its very convenient to start and stop the server that way. Believe copying the file from another default installation should fix that. Will try that. Any suggestions in the meantime are welcome

Related

mysqld: unrecognized service

I'm trying to install a MySql Server on Red Hat Linux.
I've downloaded the tar file and unarchived it.
Then, I ran:
rpm -qpl mysql-community-server-5.7.17-1.e16.x86_64.rpm
Then I tried running
service mysqld start
But I'm getting mysqld: unrecognized service
I also tried using the full path to the mysqld: service /usr/sbin/mysqld/ start but that shows the same issue.
Any idea what is wrong?
on my Ubuntu platform, I encountered the same problem showing "mysqld: unrecognized service".
to solve this error, the commend should be:
sudo service mysql start

mysql.sock does not exist error in fresh install of MySQL on Arch Linux

I'm trying to use MySQL on Arch Linux. it is already installed but this error comes up when I try to connect:
connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2 "No such file or directory")'
I've looked for /etc/my.cfg but the file does not exist.
Something must have gone wrong during the installation.
How can I "purge" MariaDB and reinstall it?
If you're using archlinux it is a vital idea to understand the package manager (pacman). For the question about /etc/my.cfg you can run
pacman -Ql mariadb
there you will see that the file is actually called:
/etc/mysql/my.cnf
Arch linux will not configure the package for you, that is part of the arch philosophy. It will provide example configurations, and even provide you with a systemd unit file
usr/lib/systemd/system/mysqld.service
but it is your responsibility to ensure that the configuration is correct and actually start the daemon.
systemctl enable mysqld # add the unit file to the boot sequence
systemctl start mysqld # runs ExecStart= in the unit file
systemctl stop mysqld # kills the daemon
systemctl disable mysqld # remove unit from boot sequence
reinstall
Since the word reinstall is in the title of the question and someone might find this question thanks to that: To reinstall mariadb you simply do
pacman -S mariadb
pacman will reinstall a package that is already installed, there is no need to remove the package (for completeness, package removal happens with pacman -R)
as of 7-28-17 I had to do this on a new install. Newbie here might save someone some time. It was a real pain.
OK HERE IS THE DEAL!!!!!
INSTALL APACHE _ NO PROB
INSTALL MYSQL _PROBLEM
pacman -S mysql then before starting service
MUST UNCOMMENT INNODB IN:
nano /etc/mysql/my.cnf
then must initialize datadirectory before starting service:
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
You need to initialize the MariaDB data directory prior to starting
the service. This can be done with mysql_install_db command, e.g.:
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
Optional dependencies for mariadb
galera: for MariaDB cluster with Galera WSREP
perl-dbd-mysql: for mysqlhotcopy, mysql_convert_table_format and
mysql_setpermission
CNF file is /etc/mysql/my.cnf in Arch Linux.
One simple way I can reproduce your issue is when MariaDB is shut down. Sorry if it sounds dumb but as you did not mention it: is MariaDB started? sudo systemctl start mysqld.service
You should have a look at MariaDB logs to get some clue: journalctl _SYSTEMD_UNIT=mysqld.service (maybe paste some part if you still don't get what is going on).
This happens the first time you install MySQL and MariaDB. As grochmal pointed out, you have to set up configurations before first use. But, the user teckk sent these three links in the archlinux newbie corner:
https://wiki.archlinux.org/index.php/MariaDB
https://wiki.archlinux.org/index.php/MariaDB#Reset_the_root_password
https://bbs.archlinux.org/viewtopic.php?id=51981
In short, you have to run the command below before starting the service:
sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
Optionally (recommended) you should improve the initial security by calling:
sudo mysql_secure_installation
Now you can start the service:
sudo systemctl start mariadb
Optionally, you could install and use a graphical front-end tool.
Carry on with setting up the configurations as described in the archwiki post on MariaDB Configuration.

can't run mysql under my user account

I installed mysql using Homebrew on my mac. It's the latest version of mysql (5.7.9). I followed the instructions from this link. Everything went fine until I had to run the command
mysql_install_db --verbose --user='whoami' --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
It spit out the errors
mysql_install_db: [ERROR] unknown variable 'tmpdir=/tmp'
2016-01-18 16:52:42 [ERROR] Unrecognized options
The mysql_install_db command has been deprecated as of version 5.7.6, so the guide you linked is no longer valid:
mysql_install_db is deprecated as of MySQL 5.7.6 because its functionality has been integrated into mysqld, the MySQL server. To initialize a MySQL installation, invoke mysqld with the --initialize or --initialize-insecure option. For more information, see Section 2.10.1.1, “Initializing the Data Directory Manually Using mysqld”. mysql_install_db will be removed in a future MySQL release.

MySQL on ubuntu 12.04 won't run after MySQL Workbench installed

Recently I installed MySQL Workbench 6.2 and used it to create ER diagrams of the MySQL 5.5.41 databases I'm working with on Ubuntu 12.04. Everything worked fine until I restarted Ubuntu and suddenly mysql was no longer running. Running mysqld from the command line results in this:
150216 12:50:37 [ERROR] Can't read from messagefile '/usr/share/mysql/english/errmsg.sys'
150216 12:50:37 [Warning] Can't create test file /var/lib/mysql/euler.lower-test
150216 12:50:37 [Warning] Can't create test file /var/lib/mysql/euler.lower-test
mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13)
150216 12:50:37 [ERROR] Aborting
150216 12:50:37 [Note]
The file /usr/share/mysql/english/errmsg.sys exists, owned by root, with permissions 644. The directory /var/lib/mysql exists, owned by mysql, with permissions 700.
I'm guessing that the installation of Workbench changed something (maybe config files) so that mysql is no longer working, but after a fair amount of Internet research, I have not discovered how to solve this problem. Any help will be greatly appreciated.
Seems like file permission problem. Try running mysqld again using sudo
If this doesn't help, maybe you shouldn't be starting it directly via mysqld. Check if the installer package added a service
sudo service --status-all | grep mysql
And if one exist, use it to start mysql, typically:
sudo service mysqld start
Also don't forget to check if mysqld is already running. If so you can't start duplicate process. I know this sound silly but has happened to me before
ps -ef | grep mysqld

kamailio start failed ERROR: PID file does not exist

I have installed kamailio with the mysql, presence, nat, auth modules. All of them works on another Server(Amazone Ec2). Now i'm trying it on an Notebook, and get some problems.
When i try to start kamailio with the kamctl command:
sudo kamctl start
INFO: Starting Kamailio :
ERROR: PID file /var/run/kamailio.pid does not exist -- Kamailio start failed
I have already tried, to touch this file, change settings for the mysql db, and searched other solutions on the web. But nothing helped me.
Look in syslog file for error messages printed by Kamailio, you should get hints about the reason why is not starting -- syslog can be /var/log/syslog (debian like distros) or /var/log/messages (centos like distros).
You can also try to start it printing log messages to the terminal, something like:
kamailio -M 8 -E -e -dd
Then error messages can be seen directly.
Try to create a kamailio folder in the /var/run/ directory.
mkdir /var/run/kamailio
# Used kamailio 4.3.1 installed from source.
# Used this command to start:
/usr/local/sbin/kamctl start