Skip to main content

database dump and restoration

To create dump of a database, type the following command:

$MYSQLDUMP -u $MyUSER -h $MYHOST -p $MyPASS $db > $FILE

RESTORE :

run MySql administrator -> Restore -> open file (back up) -> Restore.
Fill in the required options.

You can also change/assign the username and password from administrator itself.

It's a bit difficult to do it in ubuntu.
Well, here we go for restoration in ubuntu:

1) open terminal
2) mysql -u username -p
3) create database db_name;
4) change db_name;

close this terminal

5) open a new terminal
6) sudo -u username -p database_name < db_file.dmp;

and we are done with restoration
we can check it by opening a new terminal.

Comments

Popular posts from this blog

VBA MAcro to generate "table of contents with hyperlinks" automatically in a ppt

VBA MAcro to generate "table of contents with hyperlinks" automatically in a ppt:



Function TableOfContent(count As Integer)
'count is the no. of slides in ppt
Dim var As Integer
Dim i As Integer, scount As Integer
Dim strSel As String, strTitle As String, strb As String, strtemp As String, str As String
Dim arr() As String
Dim index As Integer, indexcount As Integer, slidecount As Integer
Dim summary As Slide
Dim para As Integer
Dim slideOrder() As Integer


'To generate the Table of contents slide
ReDim slideOrder(count - 2)

'Collect all the IDs of the selected slides
For i = 1 To count - 2
slideOrder(i) = i + 2
Next

'Iterate over the slides in Index order
slidecount = UBound(slideOrder)
For scount = 1 To slidecount
If ActivePresentation.Slides(slideOrder(scount)).Shapes.HasTitle Then
'Build up the ToC Text
strTitle = ActivePresentation.Slides(slideOrder(scount)).Shapes("UseCase").TextFrame.TextRange.Text + ": "
str = ActivePresentation…

redis server went away

It feels really awkward to see "redis: uncaught exception: Redis server went away" when it was working and suddenly this message bumps up. I faced the same situation while accessing php redis but I guess it's more generic one, more related to redis. So, here are possible solutions that I am able to find and highlighting the one which really did work for me.

1. /usr/sbin/setsebool httpd_can_network_connect=1


By default, SELinux does not allow Apache to make socket connections. So, enable the connection.

2. Try to stop the redis server and restart it again.
either of these two should work:
a) redis-cli
b) redis server

3. There might be issues with switch, try to use different switch.

error in eclipse on import org.eclipse.jetty.server.Server;

When you find error in line import org.eclipse.jetty.server.Server; it means eclipse doesn't contain jetty.jar. Right click on project -> properties on left pane -> java build path right pane -> add external jar under libraries tab link it to all the jar files of jetty folder. can download jetty from : http://www.eclipse.org/jetty/downloads.php now rebuild the project.