New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSCache and CWP CageFS at no extra cost with all CWPpro licences. The LSCache plugin is integrated into our WordPress and other script installers, and CWP CageFS gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

MySQL root password is invalid!!! Error

Started by mason64, March 15, 2024, 05:35:29 PM

Previous topic - Next topic

mason64

Good day everyone hope everyone who reads this is well.

i wanted to try out cwp on a vm but when i go to install it i get an error - see below.


cwp-el7-latest: line 561: mysql: command not found
Failed to enable unit: Unit file named.service does not exist.
sed: can't read /etc/named.conf: No such file or directory
sed: can't read /etc/named.conf: No such file or directory
sed: can't read /etc/named.conf: No such file or directory
55 files removed
#########################################################
          CentOS Web Panel MailServer Installer
#########################################################

visit for help: www.centos-webpanel.com

cwp-el7-latest: line 604: mysql: command not found
MySQL root password is invalid!!!
Check password and run this script again.

Any ideas what this could be and how i could fix it to get the software installed.
i havent set any root passwords for MYSQL so not sure what its asking for.

Thank you
Mason

overseer

Did your core OS install okay before you tried to install CWP? You should have named installed, as well as MariaDB (MySQL). What OS is this on? We are recommending AlmaLinux 8 as the best starting point for a new server since CentOS 7 is EOL and as a beta OS, CentOS 8 Stream is not viable foundation for a server.

mason64

Hi Thanks for replying.

I installed rocky Linux 8.6 then fully updated it and installed cwp using the guide on youtube from cwp and got this far.

Would you recommend i flatten the install and install Alma linux 8?

Just checking do i need to have Mysql installed and named installed before i run the cwp?

Hope that helps 

overseer

I think you will have a smoother experience if you start with AlmaLinux 8 over Rocky. Plus having upgrade options with ELevate gives you a good path forward and support through the end of the decade is nice, too.

Starburst could more directly guide you, but it probably depends on where you get your installer as to whether AlmaLinux comes with MariaDB and what version. I would add the GPG keys and make sure you have the latest 10.11.6 LTS version before installing CWP.
http://wiki.centos-webpanel.com/mariadb-upgrade-to-new-version

Starburst

Who, what? I swear I didn't know she was your sister...  ;D


I would recommend AlmaLinux 8.x
Most of our production servers (2 run AL 9) and mirrors are running that version.

The base install script from CWP (https://control-webpanel.com/installation-instructions#step4) works fine, and will install the CentOS version of MariaDB 10.4.

As overseer mentioned, you can install via the base script and then follow the Wiki to upgrade to MariaDB 10.11.

If you choose to modify the install script or upgrade later, just remember to select the Red Hat Enterprise Linux version 8 for the new MariaDB repo info.

Also when CWP finishs installing, cut & paste the info into a text file, just incase you nee dit down the road.
As that screen also shows you what you MariaDB password is.

At the end of the install, it will look like:

#############################
#      CWP Installed        #
#############################

Go to CentOS WebPanel Admin GUI at http://SERVER_IP:2030/

http://(SERVERS BASE IPv4):2030
SSL: https://(SERVERS BASE IPv4):2031
---------------------
Username: root
Password: ssh server root password
MySQL root Password: (SOME PASSWORD)

#########################################################
          CentOS Web Panel MailServer Installer
#########################################################
SSL Cert name (hostname): (HOSTNAME HERE)
SSL Cert file location /etc/pki/tls/ private|certs
#########################################################

Visit for help: www.centos-webpanel.com
Write down login details and press ENTER for server reboot!
xx files removed
Please reboot the server!
Reboot command: shutdown -r now
#


If you don't save that, you'll have to go thru a process to reset the MySQL (MariaDB) root password.
As it is NOT the same as the system root password.

mason64

Thanks guys

Download Alman 8 now from alma's web site.

I will give it ago and update the post with how i get on.

Thanks again

mason64

I installed Download Alma Linux 8 – 64bit (MINIMAL)

ran the updates,

rebooted the server

ran sh cwp-el8-latest and i get the same error again

cwp-el7-latest: line 604: mysql: command not found
MySQL root password is invalid!!!
Check password and run this script again.

what else could i be doing wrong?

sorry to be apain :)

Starburst

You're not installing MariaDB before CWP, right?

All you should have to do is the basic AlmaLinux 8 image, nothing else, set the hostname & timezone.

Is this a public IP (VPS or Dedicated server) or behind a NAT?

If it's public, and you want, PM me, and I can try to get it installed after you do a reimage of the basic AL 8.

mason64

Hi

Its behind NAT - testing CWP before i start to use it

Fresh install, all that was done was apt update and apt upgrade and a reboot then ran the commands to install cwp copy and paste from the web site. nothing else not installed anything

i used the iso AlmaLinux-8.9-x86_64-boot.iso

I can open it up with a fresh install for you to take a look if i pm you?


Starburst

???
apt is a Debian command, shouldn't work in AlmaLinux. It uses Yum & DNF.

You want to use the AlmaLinux DVD, as the Boot doesn't install all necessary components.

mason64

so sorry! i am so used to typing apt (dont use yum package manager much - always use ubuntu) i meant yum! muscle memory while typing that is :) if you ever saw my command history on any redhat based systems 90% of my errors are typing apt :)

mason64

#11
hey thanks for the help so far,

coming back to this now after a few weeks off

is it the top one i use


if so i have done but do i need to tell it not to install the gui? when i use that it installs the gui

Thanks
Dave

overseer

Check your run level:
systemctl get-default

To change to multi-user CLI (no GUI):
systemctl set-default multi-user.target


mason64

think i found the issue all along.

did another fresh install using the minimal version but i think i was using the wrong install file



i was using version 7 on alma 8! used 8 and its all working.

must say the 10 minutes i have had a play its great!