Disallow cdr report

how i can disallow cdr report for have more space on the disk?
Thank you

How big is your disk and what does

ls -lh /var/lib/mysql/asteriskcdrdb/


in total is 10 giga but many times i have problem because is full…

If i launch your comand i have this return:

-rw-rw---- 1 mysql mysql 9.3K Oct 25 16:31 cdr.frm
-rw-rw---- 1 mysql mysql 11M Feb 6 10:04 cdr.MYD
-rw-rw---- 1 mysql mysql 2.9M Feb 6 10:04 cdr.MYI
-rw-rw---- 1 mysql mysql 9.3K Oct 25 16:31 cel.frm
-rw-rw---- 1 mysql mysql 11M Dec 6 05:02 cel.MYD
-rw-rw---- 1 mysql mysql 1.5M Dec 6 05:02 cel.MYI
-rw-rw---- 1 mysql mysql 65 Oct 25 16:28 db.opt

What i can do?

Well , you don’t have a problem with cdr reports , you are using all of 11M for it to work, what is your real problem?

the problem is after 2-3-4 days my server is full and it not work.
In the past i opened a post where i explane it and maybe you replyed me and tell me about the space.
When i deleted the content of log file the server begin to work.
But i can not delete every 2-3-4 days this content, so i think about not record the log of cdr file…

For example now i rent a dedicated server and i’m following this guide:
But when i have to launch the command mysqladmin -u root create asterisk
i receive this error:
error: ‘Access denied for user ‘root’@‘localhost’ (using password: NO)’

So i can not continue.
If i can finish this installation i will have not problem with space because this server have 500 GB…

You need to edit all your files in /etc/logrotate.d/* as I previously suggested to you, particularly the asterisk ones.

For your new server, you will need to use the mysql root password you created on your server

mysqladmin -u root -pyourpassword create asterisk

It really is all in the wiki

of all the things that can take space on a FreePBX system, the CDR reports are probably the most important thing to keep. Make sure you have disabled call recordings, voicemail saving (you can have them emailed off and deleted instead of keeping them), as dicko mentioned, ensure your actual linux system logs are rotating frequently and also make sure mysql transaction log isn’t growing continuously in /var/lib/mysql/. Beyond that, you should have plenty of space and I would leave the CDRs alone - perhaps script a backup and start a new CDR DB once per month if you absolutely have to.

i saw the logrotata.d file but i don’t undestand what i have to change…
i have no record call active, no voicemail saving, nothing.

For the new installation on the dedicated server you write me the command is:
mysqladmin -u root -pyourpassword create asterisk, for example
mysqladmin -u root -ptest123 create asterisk

but i have the same error
i tryed also with space, like mysqladmin -u root -p test123 create asterisk
but nothing…

No space allowed, test123 would NEED to be the SAME root password you created when you installed mysql-server, when

mysql -u root -pyourpassword

works you can proceed.

it’s too strange, i know the mysql root password because i can show it using
/usr/local/psa/bin/admin --show-password

but if i launch command mysql -u root -pyourpassword
i continute to receive message:
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)

For this i don’t undestand why i can continue…


is not a script I am familiar with, possibly plesk , but does it return your mysql root password (apparently not so much) ?

yes, the technical support of my dedicated server told me the password for admin user of plesk is the same of the mysql root password and they give me this 2 links:

Then from your posted link that it is for the admin user not root, did you try

mysql -uadmin -p`cat /etc/psa/.psa.shadow` 

wherever you need it ?

if i try with
mysql -u admin -pmypassword
i have always the error
ERROR 1045 (28000): Access denied for user ‘admin’@‘localhost’ (using password: YES)

If i use the command mysql -uadmin -pcat /etc/psa/.psa.shadow it open the mysql cli

Your admin password is presumably what

cat /etc/psa/.psa.shadow

returns, you should read your own links more carefully :wink:

mmm in this case i receive a very long password, maybe is cripted? Because i don’t know this word :slight_smile:

You do now, remember it :slight_smile:

i don’t undestand if is cripted password…

No , its not encrypted if it works as typed as you proved, it is apparently a hash of your plain text password, you really need to go to plesk/parallels, whoever you bought your server from, for why they do what they do and any other gotchas that might prevent you installing FreepPBX et al. on itself.

Good Luck though

ok thank you
Last question: can i edit this password?