Asterisk will not start, maybe an mysql issue

I am running asterisk as a wholesale gateway and my back up has crashed, thankfully my main server is still running.

i perform asterisk -vvvr and and asterisk -r and i get the following response.

Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)

This file does exist, and it is setup the same way as the working server.

When i go to var/log/asterisk.log i get the following:

151024 02:32:19 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
151024  2:32:19 [Note] Plugin 'FEDERATED' is disabled.
151024  2:32:19 InnoDB: The InnoDB memory heap is disabled
151024  2:32:19 InnoDB: Mutexes and rw_locks use GCC atomic builtins
151024  2:32:19 InnoDB: Compressed tables use zlib 1.2.3
151024  2:32:19 InnoDB: Using Linux native AIO
151024  2:32:19 InnoDB: Initializing buffer pool, size = 128.0M
151024  2:32:19 InnoDB: Completed initialization of buffer pool
151024  2:32:19 InnoDB: highest supported file format is Barracuda.
151024  2:32:19  InnoDB: Waiting for the background threads to start
151024  2:32:20 InnoDB: 5.5.41 started; log sequence number 1589349
151024  2:32:20 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
151024  2:32:20 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
151024  2:32:20 [Note] Server socket created on IP: '0.0.0.0'.
151024  2:32:20 [Note] Event Scheduler: Loaded 0 events
151024  2:32:20 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.41'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL) by Remi
151024  2:32:25 /usr/libexec/mysqld: Table './asterisk/cdr' is marked as crashed and should be repaired
151024  2:32:30 /usr/libexec/mysqld: Table './asterisk/cdr' is marked as crashed and should be repaired
151024  2:32:34 /usr/libexec/mysqld: Table './asterisk/cdr' is marked as crashed and should be repaired
151024  2:32:39 /usr/libexec/mysqld: Table './asterisk/cdr' is marked as crashed and should be repaired
151024  2:32:43 /usr/libexec/mysqld: Table './asterisk/cdr' is marked as crashed and should be repaired
151024  2:32:47 /usr/libexec/mysqld: Table './asterisk/cdr' is marked as crashed and should be repaired
151024  2:32:52 /usr/libexec/mysqld: Table './asterisk/cdr' is marked as crashed and should be repaired
151024  2:32:56 /usr/libexec/mysqld: Table './asterisk/cdr' is marked as crashed and should be repaired
151024  2:33:01 /usr/libexec/mysqld: Table './asterisk/cdr' is marked as crashed and should be repaired
151024  2:33:02 [Warning] IP address 'our billing server IP address' could not be resolved: Name or service not known

i go to that table usng phpmyadmin, and it is crashed.

1. How do i fix it.
2. How do i restart Asterisk.

Thanks
KoolandrewAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dan CraciunIT ConsultantCommented:
In phpmyadmin, select the table and then go to Operations -> Repair table.

Note that the repair operation can be destructive (meaning you might lose records) so make a backup before.

After that table is successfully repaired, try restarting asterisk.

HTH,
Dan

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
KoolandrewAuthor Commented:
I had figured that out, but thanks.
Dan CraciunIT ConsultantCommented:
You're welcome.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.