mysql not found for installing wordpress? - mysql

I am trying to install WordPress in my ubuntu 16.04 which requires MySQL while going with the process I am getting this every time after spending hours on this I still can't find the solution and while checking the MySQL it shows it is already installed.
#root :~$ mysql​ -u root -p
No command 'mysql​' found, did you mean:
Command 'mysqld' from package 'percona-server-server-5.6' (universe)
Command 'mysqld' from package 'percona-xtradb-cluster-server-5.6' (universe)
Command 'mysqld' from package 'mariadb-server-core-10.0' (universe)
Command 'mysqld' from package 'mysql-server-core-5.7' (main)
Command 'mysql' from package 'mysql-client-core-5.7' (main)
Command 'mysql' from package 'mariadb-client-core-10.0' (universe)
#root:~$ mysql​: command not found

Have you installed?
sudo apt install mysql
You can check installed packages using
sudo apt list | grep mysql

Related

rpm package installed successfully but does not run

setup: i3wm, fedora 31
I am facing this issue, in which some rpm's even after being installed,
For e.g. I have Bluejeans installed, but when I try running the app, it results in command not found, the baffling part being I have no such issue opening it in gnome.
$ rpm -qa | grep -i bluejeans
bluejeans-v2-2.0.0-188.x86_64
$ bluejeans
zsh: bluejeans: command not found...
same goes when I try accessing using dmenu.
solved the issue, bluejeans was not getting installed in /usr/bin or any other similar paths.
rpm -ql bluejeans
package bluejeans is not installed
while they also named package as bluejeans-v2 which made it harder to search, while in gnome I could start using bluejeans even from the terminal.
solution:
create a symlink to /usr/bin where you have bluejean-v2 installed
ls -s /usr/bin/bluejean-v2 ${install_path}/bluejeans-v2

Trouble installing MySQL on Amazon Linux

I'm trying to install MySQL on my Amazon Linux instance following these set of commands:
(Taken from here):
wget https://dev.mysql.com/get/mysql57-community-release-el6-11.noarch.rpm
yum localinstall mysql57-community-release-el6-11.noarch.rpm
yum remove mysql55 mysql55-common mysql55-libs mysql55-server
yum install mysql-community-server
service mysqld restart
mysql_upgrade -p
However, when I run:
service mysqld restart
I get the following error message:
Running the same command prefixed with sudo gets the following error message:
And then running:
mysql_upgrade -p
Produces the following error message:
A little bit lost on how to tackle this problem. Any ideas?
You can use the root user to try the above operation.
If permission is still denied, then you need to focus on SELinux and AppArmor.

pm2 command not found after path is added

I am installing PM2 for hubot rocket.chat adapter. so i did the following:
I firstly added a file to hubot adapter folder, then
sudo npm install pm2 -g
cd <hubot directory>
pm2 start <pm2.json>
The i got error saying this:
No command 'pm2' found, did you mean:
Command 'wm2' from package 'wm2' (universe)
Command 'pms' from package 'pms' (universe)
Command 'pmk' from package 'pmk' (universe)
Command 'pmw' from package 'pmw' (universe)
Command 'fpm2' from package 'fpm2' (universe)
Command 'pom2' from package 'libpod-pom-perl' (universe)
Command 'pmi' from package 'powermanagement-interface' (universe)
Command 'pm' from package 'powerman' (universe)
pm2: command not found
Then I tried to add the path by doing:
sudo env PATH=$PATH:/home/jy/.npm-global/bin pm2 startup -u safeuser
and
export PATH=$PATH:/home/jy/.npm-global/bin
and restarted PuTTY,
still get the same error.
when I went to where PM2 is at, which is /home/jy/.npm-global/bin, and do pm2 start <pm2.json> command, still get the same error.
Is there anything i did wrong? or there might be other reasons?
The problem is that you are running NPM as sudo, so you will only be able to access it using:
sudo pm2 start server.js
Install without sudo, you may even install without the -g flag and call it directly from node_modules directory. This may be useful if you do not have root (admin) privileges in the machine you're working on.
npm install pm2
./node_modules/.bin/pm2 start server.js
Source: https://stackoverflow.com/a/40812333/1052581

mysqli extension is missing debian

i m try to install mysql-sever on debian (WD mycloud live)
i have tried everything i found on google but no success
/etc/php5/conf.d/mysqli.ini Dont exists
for install i used apt-get -f mysql-server mysql-client mysql-common
so far i have
mysql running
PHP Version 5.4.11-1
Linux WDMyCloud 3.2.26 #1 SMP Fri Dec 27 13:50:41 PST 2013 armv7l
Additional .ini files parsed
/etc/php5/apache2/conf.d/10-pdo.ini,
/etc/php5/apache2/conf.d/20-apc.ini,
/etc/php5/apache2/conf.d/20-curl.ini,
/etc/php5/apache2/conf.d/20-pdo_sqlite.ini,
/etc/php5/apache2/conf.d/20-sqlite3.ini,
/etc/php5/apache2/conf.d/include_path.ini
mysql -- version -> mysql ver 14.14 distrib 5.5.35, for debian-linux-gnu (armv71) using readline 6.2
i installed webmin there i can see my mysql-server information, i have there
Path to mysqlshow command - /usr/bin/mysqlshow
Path to mysqladmin command - /usr/bin/mysqladmin
Path to mysql command - /usr/bin/mysql
Path to mysqldump command - /usr/bin/mysqldump
Path to mysqlimport command - /usr/bin/mysqlimport
MySQL configuration file - /etc/mysql/my.cnf
Mysql Unix socket - /var/run/mysqld/mysqld.sock
Database files directory - /var/lib/mysql
sudo apt-get install php5-mysql
Will install package containing both old one and the new one, so afterwards all you need to do is to add
extension=mysqli.so
in your php.ini, restart apache and it should work.
Source:
https://stackoverflow.com/a/10835420/3566788
I encountered above issue while configuring 'phpmyadmin' for php5.7 and mysql#5 combination that was required for one of my old raspberry pi projects.
In my case when I tried the
sudo apt-get install php5-mysql
I got error -
E: Package 'php5-mysqli' has no installation candidate
The error also mentioned about the replacement packages,
Package php5-mysqli is not available, but is referred to by another
package. This may mean that the package is missing, has been
obsoleted, or is only available from another source However the
following packages replace it: php5-mysqlnd php5-mysql
I executed following and it worked for me.
sudo apt install php5-mysqlnd
Hope it helps.

MySQL starting error on CentOS 6

I have removed the preinstalled MySQL from CentOS 6 using the command-
yum remove mysql mysql-*
Now, I want to install "MySQl-server-5.5.28-1.linux2.6.i386.rpm" in my system.
But it could not start on my system. Please tell me how to start the MySQL with user account as well as in root also.
I have done this:-
[rex#dhcppc0 MySQL]$
[rex#dhcppc0 MySQL]$ su -
Password:
[root#dhcppc0 ~]# cd /home/rex/Documents/Software/MySQL
[root#dhcppc0 MySQL]# rpm -i MySQL-server-5.5.28-1.linux2.6.i386.rpm
package MySQL-server-5.5.28-1.linux2.6.i386 is already installed
[root#dhcppc0 MySQL]# mysql -u
-bash: mysql: command not found
[root#dhcppc0 MySQL]# mysql -u mysql
-bash: mysql: command not found
[root#dhcppc0 MySQL]# mysql.server start
-bash: mysql.server: command not found
MySQL-server-xxxx is package that contains only MySQL Server. Executable file for server is "mysqld" - "d" letter is for a daemon).
File that you trying to execute (mysql) is MySQL client. There is no client application in server package.
Please install MySQL-client-xxxx package, where xxxx is a version.
Execute the initscript below as a root user:
# /etc/init.d/mysql start
If you try to access the database from local client, you need to install MySQL-client-5.5.28-1.linux2.6.i686.rpm package.
Then you can control the MySQL database.
$ /usr/bin/mysql -u mysql