last day (15 days later) » 

6:36 PM
Yeah lol just pasted the wrong thing
 
I did that, reset my root password by issue still exists
 
Anyway how's that going, same problem?
ok did you check the integrity of the data
with the mysqlcheck and mysqlrepair commands
 
what do you mean by that? Database is working
but it's not accessible via services
 
Ok I once had a problem similar, but the cause was a table that got corrupted. Anyway I'll guess it is only an upstart problem then, in that case did you do the dpkg-reconfigure thingy?
 
thingy is it a service I'm not aware of?
 
6:40 PM
if yes, then we can narrow it down to a script that is not correct, can you paste or better yet, let me paste my mysql script here from /etc/init.d
hehe I meant dpkg-reconfigure mysql... which I mentioned in the other chat
And I quote

Also, if it works but still has the problem, might I recommend reconfigure the little guy with

sudo dpkg-reconfigure mysql-server-5.5
sudo dpkg-reconfigure mysql-client-5.5
@Nazariy going to create another room to not bother the rest here
 
ah, this was done, I was prompted to change root password
 
ok now here is my script then
see if it compares to yours
thats the /etc/init.d/mysql file in my case
check the parts that mention upstart
 
ok let me compare
 
By the way I'm using Percona fork of MySQL
 
6:46 PM
no problem I don't think they would change any upstart script
btw the link is not loading
can you use paste2.org
just in case am having problems with the pastebin site
 
I think it was private, can you try again?
 
it basically stays at "Loading..." and the page is blank
 
ok, here is another: paste2.org/p/2846119
 
let me try with firefox
a ok yeah that one opened
a ok no thats your mysql configuration file, the one I linked was the service script. At least let me compare the mysql you have to mine. I need 2 things from you:

1. Did you change the mysql.conf file in any way?
2. Can you upload the /etc/init.d/mysql file. This is the one I need to see
ok for point number 1 we have the same identical config file,
now to see the script file
 
/etc/init.d/mysql was lasta time updated in October
 
6:53 PM
What am looking for is if the script file for mysql updated to 5.5 or stayed with the old format
no problem
paste the script inside the file to pastebin2
or compare it yourself to the one I uploaded
This is the one I have: paste2.org/p/2846103
or even better, simply move the mysql file in /etc/init.d to another place and paste in there mine
 
can you point me where mysql.conf located?
 
if it works then there were upstart lines that did not change when the upgrade was done
ok you have 2 files
your configuration file
/etc/my.cnf
/etc/mysql.conf
/etc/mysql/my.cnf
which can be in
one of those has to exist
the updated one is the last mentioned there
and the other one is the SCRIPT file
which is the one that actually starts the service
that one is in /etc/init.d/mysql
 
sorry I have submitted wrong file, paste2.org/p/2846132
 
the actual file is called "mysql" no extensions
ok I see there percona did not use the upstart, give me a second to create a script for you
without touching the percona stuff of course
make a backup of you actuall mysql file
while I make the file
 
mysql file that I showed to you?
 
7:00 PM
yes
since what we are going to do right now is

1. Copy the new file am going to give you to /etc/init.d/mysql
So you want to have a backup before we do that
 
ok, backup done, but I dont understand why it was working until today and file it'self was not changed?
 
wait, was working until today and the file has not changed since october
then this is wrong, have you seen the configuration files in mysql
just in case something changed there?
 
only my.cnf was updated
 
your my.cnf looks exactly the same as mine
is it possible to have ssh access to that PC?
or vnc access
 
It's VPS server
 
7:05 PM
do you have admin rights to create a temporary account?
 
yes, I have a root rights but I'm not pro at server administration, I'm more windows guy
If you give me a command to execute I can do that
 
Well I could start with looking at dmesg
first try to run the sudo service mysql start
then go to dmesg to look on what it says about the error there
 
`root@host:~# sudo service mysql start
mysql start/running, process 7625`
on stop it hangs
/etc/init.d/mysql start
* Starting MySQL (Percona Server) database server mysqld
 
do this
sudo service mysqld start
with the D in mysql
 
unrecognized service
 
7:11 PM
ok good, just checking to make sure the only service is "mysql"
now use the cat command in /var/log/mysql...
There is /var/log/mysql.err, /var/log/mysql.log and /var/log/mysql/error.log
 
so you need a logs?
 
one of them has to have some information as to why the service is failing
no thanks, just to see if you see something in them
since you are in a production environment they might get huge
and my internet connection is very slow
so it is better for you to read them
do something like
cat /var/log/mysql/error.log
the last lines should mention something about the problem
 
lucky you. Small log ^^
Well I can see a huge problem there
let me try this
first please go to your mysql folder where the database resides
 
ok
 
7:18 PM
now make sure mysql is not running
this is very important because we are going to operate like a doctor on the database
 
I believe mysql is down
 
ok just in case
sudo killall -9 mysql
 
did it via service and via /init.d/
 
after that
copy the injured file
a ok no problem buddy, that also works
 
mysql: no process found
 
7:20 PM
the file you have corrupted is ibdata1
now MOVE the file to another place
or better yet, same place, different name
like mv ibdata1 ibdata1.bad
 
ok
 
ok now lets try to preserve as much as possible from that damaged file
do now this
cp -a ibdata1.bad ibdata1
 
I believe I should put full path to bad data and new data?
ok, done
file look the same to me
 
ok cross your fingers and start mysql with the /etc/init.d way first
 
root@lvps217-199-163-73:/var/lib/mysql# /etc/init.d/mysql start
* Starting MySQL (Percona Server) database server mysqld [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.
 
7:25 PM
ok wait a couple of seconds, depends on size of DB
even after that, then do this
mysqlrepair -A -u -p
after the -u type the mysql user, am guessing root
this is to check the whole mysql database for problems and fix them automatically
 
ok, after I have started mysql, in data dir apear one file with .pid extension, it was not there before
 
thats gooooodd
you now have a process id file
good good
do the repair procedure I mentioned above
you can use mysqlcheck also, same thing for this purpose
 
and -p is the password?
 
same parameters for both
yes but dont type it
just press enter
then type it
bad habit to type passwords in command lines ^^
 
ok
 
7:28 PM
ok let it check the system
after that then we go to service
do a sudo restart mysql
without sudo if you are already root
or service mysql restart whichever you like
 
hm, cannot execute them as password dont match
I guess password I created was complicated
 
hehe maybe
my PC at home, work, portable all have the same password
x
hehe, super short
 
so how would I reset mysql password again?
 
do the dpkg-reconfigure again
dpkg-reconfigure mysql-server-5.5
 
I'm still receiving access denied
 
7:34 PM
do client then
dpkg-reconfigure mysql-client-5.5
need to stop service just in case
 
does not do anything
by the way, for percona there is a different file
 
a ok then use that one hehe
 
something like percona-server-server-5.5
 
Am trying to hope percona has not changed a lot of mysql when compared to the normal one
ok then dpkg-reconfigure [Insert crazy percona mysql file here]
 
I guess they did as it's optimised fork for performance
that what I was using
 
7:37 PM
let me know if it asks for the password
 
ok, just to confirm, mysql-server-5.5 does not exists, only percona-server-server-5.5
so I was doing it right
 
see I learned something right there
 
ok, password window appeared, hope new password would work
for some reason the process take a while, it is ok?
 
yes, but should not take like 2 minutes
in a slow Pc might take 10 to 15 seconds
 
root@lvps217-199-163-73:/var/lib/mysql# dpkg-reconfigure percona-server-server-5.5
* Stopping MySQL (Percona Server) mysqld
* Stopping MySQL (Percona Server) mysqld
* Starting MySQL (Percona Server) database server mysqld
* Checking for corrupt, not cleanly closed and upgrade needing tables.
is it ok, that it tries to stop it twice?
 
7:41 PM
good did you manage to do the mysqlrepair or mysqlcheck commands?
 
not yet, trying it again
 
yes, what that means is that, the first time, the service had X amount of seconds to stop the service, if not, it would retry again
To a maximum of 5 tries I think
 
no, mysql repair still throws me an error
seems like it does not like my password
 
can you log to mysql
 
maybe they are using some other command for mysqlrepair?
 
7:43 PM
just to see something
mysql -uroot -px
lol I mean without the x at the end
 
well, website is working I can access databases, as it was before
 
then mysqlrepair as not part of percona
so there is nothing I can do there
can you then try service
service mysql restart
 
mysql still not accessible via service
root@lvps217-199-163-73:/var/lib/mysql# service mysql restart
restart: Unknown instance:
are there any places where services are hooked to, is it possible to rescan/repair it?
my root password is still rejected
 
well for what I know, service tried to read the mysql script and look for the upstart code
the mysql root password or system root password?
 
mysql password
 
7:47 PM
do you have aptitude
 
I dont know
how would I check?
 
type aptitude --help
if not, install it, gonna save us some time with it instead of apt-get
 
not found
 
ok
apt-get install aptitude
 
installed
 
7:49 PM
after that we will start using it
aptitude search mysql
look for anything that has percona and mysql on it
 
I believe there is something wrong with it, paste2.org/p/2846303
there are mysql 5.1 and 5.5
 
wait, are the percona apps installed manually?
 
yes
via apt-get
 
a ok thats the normal way
what I meant was, if they were downloaded without using apt-get or aptitude or any package manager in ubuntu
 
server is managed by PLESK if it can help
 
7:53 PM
weird since I do not see them in the list you gave me
aaaa okk
then you need to remove the 5.1 versions
to avoid problems, since as it looks, there are some 5.1 files in there mixed with 5.5
plus the percona ones
 
can you tell me what does this list mean, and what mysql 4.1 doing there?
 
4.1 is for backward compatibility with people that come from it and have your ubuntu version
that list just shows all packages related to mysql that you can install
or are installed
but do this righ tnow
 
so how would I know which one is installed?
 
to make sure you stay on 5.5
the ones installed have an I in the beginning of the line
for example
i php5-mysql - MySQL module for php5
it has an "i" in the beginning meaning installed
 
that make sense, what about p and v?
 
7:56 PM
looking for a good guide that talked about all of them
specially the letter C
that you have there
 
yes there are C to :)
 
is it possible to not use the percona files and use the actual ones that come with ubuntu?
just asking if that is one way of doing it
 
ok, as I can seed there is two branches installed 16 and 18 of percona
 
which adds to the problem of other versions of mysql in ubuntu
 
well, I have installed percona for purpose as it's most fastest version of MySQL
 
8:01 PM
compared to? I mean 5.5 is very fast in general. Even the one that comes with ubuntu I could bet that if you did a select/delete/update test on about 500 thousand records, the difference would be very little.
just an idea, I used to have a very big DB and jumping from 5.1 to 5.5 was, well, quite the kick of speed
 
ok ill assume that it cant change
 
I can restore server from backup and try to install it again, technically mysql server is working only services complain
 
for future reference, I recommend tunning the my.conf file which percona did to get those results, and adjust them to your needs. With the 5.5 in ubuntu you can really lower latency a lot, for apps that use it, and benefit from multiple users connected.
ok if you can do that, before going to it
since that would mean not learning what really happened, try to remove mysql 5.1
 
so what's your suggestion?
 
8:05 PM
he configuration files for it are still in the system
aptitude remove mysql-server-5.1
aptitude purge mysql-server-5.1
that would really remove the config files
THEN install the mysql percona version
the problem there is that somehow, there are 2 versions of mysql there
the percona and some left over 5.1 mysql files
at least for what I can read from the aptitude list
if that does not work, then you can proceed with the last idea right now which is to go back with the backup
 
it works!
I guess it was caused by PLESK update
 
removing the 5.1 one?
 
Thanks Luis
yes
 
good, glad it worked
sorry it had to take so long to get to the problem
but as you can see we had many scenarios to check ^^
 
I remember I was trying to update PLESK, but it did not worked because it was trying to update 5.1 branch as it's not compatible with 5.5 yet
 
8:09 PM
correct
well friend, enjoy the rest of the day, you deserve it ^^
have a hug ;)
 
yes, it's much different from windows, by the way can you recommend some good book for this kind of tasks
 
Well askubuntu is very good place for services, for example
 
it's only when you have a trouble :)
 
59
A: What's the recommended way to enable / disable services?

Luis AlvaradoI can show you two ways. There are services that can be enable/disable using the GUI (Like Gnome) and the other is using the terminal. Since we are talking about Ubuntu and Ubuntu is quickly moving to Upstart (At least most is in Upstart job format) I will mention the way to do it via Upstart. At...

for installation problems
I would first
 
OK, thanks you for your time Luis
 
8:12 PM
check dmesg and the /var/log errors, the typically mention a lot of the problem and many times the actual answer
then simply try to divide what you did in steps.. i did this first... then this.. then this happened... aha!!!! GOT IT
you have a jungle in there and you solved it, let me tell you, you had one of the worst problems, I have seen easier ones. So think of it like you just solved something very tough to do.
Take care buddy
 
you to
 

last day (15 days later) »