how to clear server/host log [closed] - mysql

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Suddenly my phpmyadmin page can't load and redirect to the same login page, although I can login to mysql through shell, I tried to clear the cache of the browser and still have this issue. I read in this post to clear the server/host log files and I search in google 'how to do that' and I find the log files was at /var/log folder, but I don't know which files is can be delete, I'm afraid to lost my data in mysql. I'm running server with lamp. Which log files exactly should I delete?

There's no mysql data in /var/log, just log files, so you can't lose any data.
Delete a bunch of the older *.gz files. These are log files from previous weeks or months, depending on how many old files you keep during rotation. You should also update your logrotate configuration files to reduce the number of old files you save, so you don't fill up the disk again.

Related

Continuous Backup of Mediawiki [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am administrating mediawiki for my organisation. We use it as our Intranet site. It has accumulated a huge organisational knowledge base. I have make sure that mediawiki is always up and running. Knowledge base always backed up.
Is there a way to take continuous back of mediawiki files and databases? My mediawiki is hosted on LAMPP server with Debian OS.
I am trying to find a way to automate backup process.
It depends on what you mean by "continuous". If you want a copy of the database running that is always the same as the main database, you will need to set up "replication" - see http://dev.mysql.com/doc/refman/5.1/en/replication.html for how to do that.
If you want a database backup that is relatively current, then running mysqldump every hour or so is a pretty good solution.
You'll need to backup the files separately, because they are in your file system not the database. Look at running rsync every hour or so.
Why do you want a "continuous" backup and how would you use it? Do either of these approaches answer your question?

How to publish a web site via (linux) script [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm just finished with a nice HTML5+ JQM web site on my Ubuntu laptop.
A make script converts server side code to static HTML, optimizes images and compresses JTML, JavaScript and CSS.
I ask what's the method you'd suggest to upload it to my public server (I have an ftp access, no ssh).
It should be a strong, repeatable and flexible (remove deleted files on server, upload only changed files, for example?) solution, which should be automated.
This is a generic solution which you need to modify for your needs
ls your changed files and save in an array(? or may be a list)
connect to FTP
upload changed content
disconnect
Best would be to set up a versioning system that will cover the files deleted, modified etc. Set up GIT and use GIT commands to get a list of changed files and use command line FTP to upload files.

Backup MySQL DB with SVN? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a MySQL DB which should be versioned with SVN. I dont want the full DB, only the structure and selected tables. I searched the net and found some information, but nothing seems to really work in a reliable way. Any experience or hints?
Thanks :)
Check out this script which automates the process, allowing for specific selection of databases and exclusion of tables [disclaimer I am the author] - http://mysql-svn-backup.redant.com.au/
Use mysqldump to export the data you want into a file and put this into SVN. Using cron, you can automize this to run in specific timeslots
The question is: what exactly do you want to version, and why?
I propose you version an SQL file that you can import to create your database. Any tool can be used to create this SQL file (basic tool: mysqldump), which you can then save into your SVN repository. You will be able to track new tables being created by comparing revisions of SQL files.
You can automate this process by adding a CRON job to automatically dump and commit the file every 2 hours.

Can't shrink my SQL Server 2008 Log files - 260GB currently [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
My database log files have grown to 260GB and I need to shrink them. I have tried numerous scripts such as:
DBCC SHRINKFILE ('HM_Log', 0)
As well as using the Shrink option in SQL Server Management Studio however the log file doesn't seem to shrink.
Has anyone got any suggestions?
The database is on my production server and actively used, I also have a maintenance plan setup to run all the relevant tasks including a daily transaction log backup and a weekly full backup which appears to be working fine.
I need to shrink it down so I can do a full backup + restore on my local development machine, however at the moment the log files is too large for my local drive.
You need to backup the log file, then it should be reduced in size automatically.
See here: http://msdn.microsoft.com/en-us/library/ms178037.aspx
In particular, this bit:
Typically, truncation occurs automatically under the simple recovery model when database is backed up and under the full recovery model when the transaction log is backed up. However, truncation can be delayed by a number of factors. For more information, see http://msdn.microsoft.com/en-us/library/ms345414.aspx.

How to recover a MySQL database: Incorrect information in file: './xxx.frm' [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
The community reviewed whether to reopen this question 5 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
A very important database has gone corrupt that was sitting on server at a shared web host, and I didn't back up. The table contains a large list of very important email addresses. I can get a table listing, but if I open any of the tables with Navicat or phpMyAdmin, I get the following error:
Incorrect information in file: './the-table-name.frm'
I was able to get a hold of the .frm files associated with the database from the web host.
There is other data in there, but if I could at least get the email addresses, I would be alright.
How do I recover this database?
I would be willing to pay somebody to fix this.
This belongs on serverfault.
First, .FRM files contain none of your "data". They are simply the definition of the table.
If all of the following are true:
The table is using the MyISAM storage engine
You know the CREATE TABLE statement required to recreate the table
Then, do the following:
Stop MySQL
Backup your table_name.frm, table_name.MYI, table_name.MYD files
Delete them from your mysql data directory (/var/lib/mysql usually)
Start MySQL
CREATE the table again
Stop MySQL
Copy the .MYD and .MYI files back into the datadir, replacing the ones there.
Start MySQL
???
Profit
I had a similar issue, it turns out the MySQL InnoDB engine was turned off (I was able to check via phpMyAdmin, a bash pro could tell you how to do it other ways). in my case, it was a simple as restarting MySQL, but you may want to check your config if something changed there.