Koozali.org: home of the SME Server

Howto install MySql

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« on: March 30, 2006, 12:35:10 AM »
In sme 7 how can i install MySql?

How to install the newest 4.x of mysql or bette howto install Mysql 5.0

Plz. guide me to it. I am new to SME,,

Hobe you can help...

(((YES i made something stupid)))
-------------------------------
Webber Wana Bee

Offline JonB

  • *
  • 351
  • +0/-0
Howto install MySql
« Reply #1 on: March 30, 2006, 04:52:06 AM »
MySql 4.1 is already installed

rpm -q mysql
mysql-4.1.12-3.RHEL4.1

Jon
...

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #2 on: March 30, 2006, 06:29:28 AM »
But every time i try to

mysql

i get

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
-------------------------------
Webber Wana Bee

Offline JonB

  • *
  • 351
  • +0/-0
Howto install MySql
« Reply #3 on: March 30, 2006, 07:49:18 AM »
Your mysql is stopped.

service mysql restart


Jon
...

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #4 on: March 30, 2006, 08:35:29 AM »
I try also that. But it faild every time i try that...

I can not start it...

I have read many post here and on the net,,,, And i think i have to reinstall it or upgrade to are new one like Mysql 5 or something like that. just it is are newer version, than the standart in SME 7
-------------------------------
Webber Wana Bee

Offline byte

  • *
  • 2,183
  • +2/-0
Howto install MySql
« Reply #5 on: March 30, 2006, 12:04:35 PM »
Quote from: "JonB"
Your mysql is stopped.
service mysql restart


We don't use service no more (and never really should have, as we run in level 7 and doing a service may not run all commands sme need's to, we should use...

/etc/rc7.d/S**mysql restart

** is a number that should be there.

I would also report this to bug tracker as they need to track down why your mysql isn't starting/restarting

Thanks!
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #6 on: March 30, 2006, 10:19:55 PM »
I have look in that folder /etc/rc7.d and i dont have anything that have mysql.

I have:

S00microcode_ctl      S44acpid     S65dhcpd            S86httpd-e-smith
S05syslog             S50dhcpcd    S75smtp-auth-proxy  S90pptpd
S06cpuspeed           S55dnscache  S80clamd            S90radiusd
S10bootstrap-console  S55imap      S80freshclam        S90spamd
S15nut                S55imaps     S80ldap             S90squid
S15raidmonitor        S55ippp      S80ntpd             S91atalk
S26apmd               S55pop3      S80qmail            S91smb
S35oidentd            S55pop3s     S85ftp              S97messagebus
S36masq               S55tinydns   S85qpsmtpd          S98haldaemon
S37network            S57diald     S85sqpsmtpd         S99local
S39irqbalance         S57pppoe     S85sshd
S40crond              S60lpd       S86httpd-admin

But nothing whit mysql...

So can i not just reinstall it or upgrade mysql
-------------------------------
Webber Wana Bee

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #7 on: April 01, 2006, 12:04:13 PM »
i dont understand it... But do i have to make are new install??
-------------------------------
Webber Wana Bee

Offline pfloor

  • *****
  • 889
  • +1/-0
Howto install MySql
« Reply #8 on: April 01, 2006, 11:54:57 PM »
There is clearly something missing from your server.  You should have S50mysqld and it is not there.

What version of SME7? (current version is rc1)
Is this a fresh install or upgrade?
Is it stock or did you add any contribs or try to upgrade mysql?
Did mysql ever work at all?

If you are running a stock SME7 that you have not modified than you need to report this to the bug tracker.

Paul
In life, you must either "Push, Pull or Get out of the way!"

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #9 on: April 02, 2006, 12:07:52 AM »
I have make are upgrade to rc1...

I was trying to installe are crm/erp program. That program was not base on mysql, (postsql) I think thats the name. But not sure.

And since i dont have any mysql. I start whit Sme 6 and then since 7pre1, pre2 and so on.

My sql, work. Before i have, Vtiger, Sugarcrm, phpmyadmin etc running. But not now.

I dont have nothing on, my system. Nothing whit mysql.
-------------------------------
Webber Wana Bee

Offline pfloor

  • *****
  • 889
  • +1/-0
Howto install MySql
« Reply #10 on: April 02, 2006, 01:00:44 AM »
Quote
I have make are upgrade to rc1...

I was trying to installe are crm/erp program. That program was not base on mysql, (postsql) I think thats the name. But not sure.

And since i dont have any mysql. I start whit Sme 6 and then since 7pre1, pre2 and so on.

My sql, work. Before i have, Vtiger, Sugarcrm, phpmyadmin etc running. But not now.

I dont have nothing on, my system. Nothing whit mysql.


It appears that somewhere along the line you somehow lost (at least) e-smith-mysql. What is the output of:

rpm -qa *mysql*

Paul
In life, you must either "Push, Pull or Get out of the way!"

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #11 on: April 02, 2006, 01:05:26 AM »
It is:

php-mysql-4.3.9-3.9

Hope i say you something
-------------------------------
Webber Wana Bee

Offline pfloor

  • *****
  • 889
  • +1/-0
Howto install MySql
« Reply #12 on: April 02, 2006, 03:17:04 AM »
Quote from: "beeboob"
It is:

php-mysql-4.3.9-3.9

Hope i say you something


If thats all you see then you are missing some things namely:

mysql-server-4.1.12-3.RHEL4.1
e-smith-mysql-1.12.0-01
mysql-4.1.12-3.RHEL4.1

Run the following:

yum install mysql mysql-server e-smith-mysql
signal-event post-upgrade
signal-event reboot

Then after it reboots, check rpm -qa *mysql* again and see if they installed OK.  If they did, then try loging into mysql.

What I am worried about is why this happened and what else is missing from your system.  Did you maybe do something that could have removed these from your system?

Paul
In life, you must either "Push, Pull or Get out of the way!"

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #13 on: April 02, 2006, 11:53:43 AM »
OOh so nice, many thanks, I try that...


I think it is only the Mysql i an mising...

After i have hopeful install mysql aging i can install PHPmyadmin...

I was trying to set up some crm/erp to run on the server. So i can show it to my boss and others. (conflux, tiny erp/crm, sugarcrm, vtiger etc)

But one off them was very hard to get woriking(conflux, Tiny). The program want postsql or something like that, instedt off mysql. I try to install postsql and then it was going down.
-------------------------------
Webber Wana Bee

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #14 on: April 02, 2006, 01:54:10 PM »
Done...

I have do:

yum install mysql mysql-server e-smith-mysql
signal-event post-upgrade
signal-event reboot

rpm -qa *mysql*

I still get:

php-mysql-4.3.9-3.9
-------------------------------
Webber Wana Bee

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #15 on: April 02, 2006, 02:16:40 PM »
I get this:

yum install mysql mysql-server e-smith-mysql
==============================================================
WARNING: Additional commands may be required after running yum
==============================================================
Setting up Install Process
Setting up repositories
smeaddons                 100% |=========================|  951 B    00:00
smeos                     100% |=========================|  951 B    00:00
smeupdates                100% |=========================|  951 B    00:00
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package mysql-server.i386 0:4.1.12-3.RHEL4.1 set to be updated
---> Package e-smith-mysql.noarch 0:1.12.0-01 set to be updated
---> Package mysql.i386 0:4.1.12-3.RHEL4.1 set to be updated
--> Running transaction check
--> Processing Dependency: mysql-client for package: MySQL-test-standard
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package perl-DBD-MySQL.i386 0:2.9004-3.1 set to be updated
--> Running transaction check
--> Processing Dependency: mysql-client for package: MySQL-test-standard
--> Finished Dependency Resolution
Error: Missing Dependency: mysql-client is needed by package MySQL-test-standard
================================================================
No new rpms were installed. No additional commands are required.


But what is the mysql-client I can not find any thing about it??
-------------------------------
Webber Wana Bee

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #16 on: April 02, 2006, 09:12:21 PM »
It is are hard job this one...

is it better just to give up or??? I have use so many hours on this whit no result. It is not nice...
-------------------------------
Webber Wana Bee

Offline pfloor

  • *****
  • 889
  • +1/-0
Howto install MySql
« Reply #17 on: April 02, 2006, 10:53:50 PM »
Quote from: "beeboob"
It is are hard job this one...

is it better just to give up or??? I have use so many hours on this whit no result. It is not nice...


It loos like you have installed some Non-Standard packages.  Do you know EXACTLY what you did or even why you did it?

let's see what you might have that doesn't belong:

rpm -qa *My*

Paul
In life, you must either "Push, Pull or Get out of the way!"

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #18 on: April 02, 2006, 11:07:40 PM »
I dont know EXACTLY,

But i try this

1. yum install e-smith-mysql

2. signal-event post-upgrade

3. signal-event reboot

4. rpm -qa *my*

And get this

MySQL-client-standard-5.0.19-0.rhel4
MySQL-test-standard-5.0.19-0.rhel4
MySQL-server-standard-5.0.19-0.rhel4
MySQL-devel-standard-5.0.19-0.rhel4
MySQL-standard-debuginfo-5.0.19-0.rhel4
MySQL-shared-compat-5.0.19-0.rhel4
MySQL-shared-standard-5.0.19-0.rhel4
-------------------------------
Webber Wana Bee

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #19 on: April 02, 2006, 11:12:52 PM »
Is this good???

So i want to try to go to mysql..

I try

mysql

and get

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

So now i have are new problem  :-)
-------------------------------
Webber Wana Bee

Offline pfloor

  • *****
  • 889
  • +1/-0
Howto install MySql
« Reply #20 on: April 02, 2006, 11:20:15 PM »
Quote
I dont know EXACTLY,

But i try this

1. yum install e-smith-mysql

2. signal-event post-upgrade

3. signal-event reboot

This won't work because you have extra packages installed that should not be there.  It looks like you tried to install mysql5.  Don't try things like this if you don't know what you are doing.  Adding and upgrading packages on SME is dangerous...DON"T DO IT!!!

Quote
4. rpm -qa *my*

And get this

MySQL-client-standard-5.0.19-0.rhel4
MySQL-test-standard-5.0.19-0.rhel4
MySQL-server-standard-5.0.19-0.rhel4
MySQL-devel-standard-5.0.19-0.rhel4
MySQL-standard-debuginfo-5.0.19-0.rhel4
MySQL-shared-compat-5.0.19-0.rhel4
MySQL-shared-standard-5.0.19-0.rhel4

These all must be removed on at a time.  Try this:

rpm -e MySQL-client-standard-5.0.19-0.rhel4
rpm -e MySQL-test-standard-5.0.19-0.rhel4
rpm -e MySQL-server-standard-5.0.19-0.rhel4
rpm -e MySQL-devel-standard-5.0.19-0.rhel4
rpm -e MySQL-standard-debuginfo-5.0.19-0.rhel4
rpm -e MySQL-shared-compat-5.0.19-0.rhel4
rpm -e MySQL-shared-standard-5.0.19-0.rhel4

You might have to use the --nodeps option for this like

rpm -e --nodeps MySQL-client-standard-5.0.19-0.rhel4
In life, you must either "Push, Pull or Get out of the way!"

Offline pfloor

  • *****
  • 889
  • +1/-0
Howto install MySql
« Reply #21 on: April 02, 2006, 11:22:36 PM »
STOP trying things.  You need to do this a step at a time or you will get nowhere.

Trying things without knowing what you are doing is how you messed your server up in the first place.
In life, you must either "Push, Pull or Get out of the way!"

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #22 on: April 02, 2006, 11:33:35 PM »
Thanks...

I have done it now...

Do you now, what to do now
-------------------------------
Webber Wana Bee

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #23 on: April 02, 2006, 11:35:17 PM »
root@server ~]# rpm -qa *my*

php-mysql-4.3.9-3.9

e-smith-mysql-1.12.0-01
-------------------------------
Webber Wana Bee

Offline pfloor

  • *****
  • 889
  • +1/-0
Howto install MySql
« Reply #24 on: April 02, 2006, 11:44:14 PM »
Now try to install mysql4 back onto your system like this:

yum install mysql mysql-server e-smith-mysql

It should ask you if you want to install 3 or 4 packages, answer yes.

Then finish with:

signal-event post-upgrade
signal-event reboot

Paul
In life, you must either "Push, Pull or Get out of the way!"

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #25 on: April 02, 2006, 11:47:28 PM »
Nice...

I try it now....
-------------------------------
Webber Wana Bee

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #26 on: April 02, 2006, 11:49:04 PM »
yeeeeeeeeeeeeeeeeeeeeeeeees:::: Try and look:::::

yum install mysql mysql-server e-smith-mysql
==============================================================
WARNING: Additional commands may be required after running yum
==============================================================
Setting up Install Process
Setting up repositories
smeaddons                 100% |=========================|  951 B    00:00
smeos                     100% |=========================|  951 B    00:00
smeupdates                100% |=========================|  951 B    00:00
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package mysql-server.i386 0:4.1.12-3.RHEL4.1 set to be updated
---> Package mysql.i386 0:4.1.12-3.RHEL4.1 set to be updated
--> Running transaction check
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package perl-DBD-MySQL.i386 0:2.9004-3.1 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 mysql                   i386       4.1.12-3.RHEL4.1  smeos             2.8 M
 mysql-server            i386       4.1.12-3.RHEL4.1  smeos             6.7 M
Installing for dependencies:
 perl-DBD-MySQL          i386       2.9004-3.1       smeos             111 k

Transaction Summary
=============================================================================
Install      3 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
Total download size: 9.6 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): mysql-server-4.1.1 100% |=========================| 6.7 MB    01:01
(2/3): perl-DBD-MySQL-2.9 100% |=========================| 111 kB    00:01
(3/3): mysql-4.1.12-3.RHE 100% |=========================| 2.8 MB    00:25
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: mysql                                                  [1/3]warning: /etc/my.cnf created as /etc/my.cnf.rpmnew
  Installing: mysql                        ######################### [1/3]
  Installing: perl-DBD-MySQL               ######################### [2/3]
  Installing: mysql-server                 ######################### [3/3]

Installed: mysql.i386 0:4.1.12-3.RHEL4.1 mysql-server.i386 0:4.1.12-3.RHEL4.1
Dependency Installed: perl-DBD-MySQL.i386 0:2.9004-3.1
Complete!
==============================================================
WARNING: You now need to run BOTH of the following commands
to ensure consistent system state:

signal-event post-upgrade; signal-event reboot

You should run these commands unless you are certain that
yum made no changes to your system.
==============================================================
-------------------------------
Webber Wana Bee

Offline pfloor

  • *****
  • 889
  • +1/-0
Howto install MySql
« Reply #27 on: April 02, 2006, 11:53:12 PM »
Looks good so far...

DON"T FORGET THIS:

signal-event post-upgrade
signal-event reboot

Paul
In life, you must either "Push, Pull or Get out of the way!"

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #28 on: April 03, 2006, 12:23:39 AM »
The server have just restart...

Is there are next step... Something i have to do, so i can test it is running... And want about the root password for the mysql server... Is that ok..
-------------------------------
Webber Wana Bee

Offline pfloor

  • *****
  • 889
  • +1/-0
Howto install MySql
« Reply #29 on: April 03, 2006, 12:28:14 AM »
Quote from: "beeboob"
The server have just restart...

Is there are next step... Something i have to do, so i can test it is running... And want about the root password for the mysql server... Is that ok..


The root password is automatic and should be set by the system.  try to log into mysql first and see what happens:

mysql

If it gives you a password error, I can give you the steps to fix that.

Paul
In life, you must either "Push, Pull or Get out of the way!"

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #30 on: April 03, 2006, 12:31:18 AM »
mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
-------------------------------
Webber Wana Bee

Offline pfloor

  • *****
  • 889
  • +1/-0
Howto install MySql
« Reply #31 on: April 03, 2006, 12:41:15 AM »
Here is how to reset the password:

cd /service/mysqld
runsvctrl d .
cat set.password | /usr/libexec/mysqld --bootstrap \
  --user=mysql --skip-grant-tables
runsvctrl u .

Try loging in again.

If you find that webmail does not work then you need to re-initialize mysql and all the underlying systems.

CAUTION!!! The commands BELOW will delete any databases and return the server to it's original configuration. CAUTION!!!

cd /service/mysqld
runsvctrl d .
/etc/e-smith/events/actions/mysql-delete-db-files
signal-event post-upgrade
signal-event reboot
In life, you must either "Push, Pull or Get out of the way!"

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #32 on: April 03, 2006, 12:42:44 AM »
Ok,, i will try the first one..

And hope that i not have to use

cd /service/mysqld
runsvctrl d .
/etc/e-smith/events/actions/mysql-delete-db-files
signal-event post-upgrade
signal-event reboot
-------------------------------
Webber Wana Bee

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #33 on: April 03, 2006, 12:46:49 AM »
This is the best,,,, So many, many thanks... Try and look. It so great,,,, uhhh nice  :hammer:  My head...

]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.12

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>


Try and look, i come in to, mysql. Jubbbbbbiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
-------------------------------
Webber Wana Bee

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #34 on: April 03, 2006, 01:07:42 AM »
I hope this i ok...

I get the fil

smeserver-phpmyadmin-2.6.4-pl4.dmay.noarch.rpm

then go to the folder, That have the file.. I use just cd /tmp

rpm -Uvh smeserver-phpmyadmin-2.6.4-pl4.dmay.noarch.rpm

And i come in the PhpMyadmin control panel via:

https://server1/phpmyadmin/

Nice. and many, many thanks.
-------------------------------
Webber Wana Bee

Offline gregswallow

  • *
  • 651
  • +1/-0
Re: Howto install MySql
« Reply #35 on: April 03, 2006, 03:25:13 AM »
Quote from: "beeboob"
How to install the newest 4.x of mysql or bette howto install Mysql 5.0


This 3 page story is a perfect example of why you shouldn't upgrade components that are in SME7.  SME uses the CentOS rpms because Redhat and CentOS will provide security updates for mysql and php, etc, until 2012.  "Because it's there" may be a good reason to climb Everest, but not a good reason to install the newest mysql 4.x or 5.

Offline beeboob

  • ****
  • 135
  • +0/-0
    • http://www.normal.dk
Howto install MySql
« Reply #36 on: April 03, 2006, 02:08:36 PM »
Yes it is right. Never do that.

It is very stupid.. Newver just trust are howto. Next time i have to follow are HowTo, i am looking in the forum first..
-------------------------------
Webber Wana Bee

Offline MSmith

  • *
  • 675
  • +0/-0
Howto install MySql
« Reply #37 on: April 03, 2006, 04:20:14 PM »
Wouldn't it have been simpler to just install a fresh copy of SME Server?  I understand wanting to try out various CRM/ERP packages but why not start fresh with each one?
...