Something like this should do the trick:

~#replace "mthosp" "newname" < org-file.sql > new-file.sql

-- 
Later

Mogens Melander
+45 40 85 71 38
+66 870 133 224


On Thu, April 19, 2007 16:53, molemenacer wrote:
>
> I am trying to change all the names of the database from mthosp to another
> name, is this possible?
>
>
> Dan Buettner-2 wrote:
>>
>> That's a much larger file than most any text editor would work with, in
>> my
>> experience.  I'd give BBEdit on the Mac a try if nothing else, but my
>> expectations would not be too high.
>>
>> For examining and altering a file that large I'd try grep, awk, sed,
>> perl,
>> etc.
>>
>> Barring that, one thing you might do is use perl or another scripting
>> language (or perhaps some utility software) to read the file in 100 MB
>> or
>> so
>> chunks and write out to a series of smaller files.  Edit the smaller
>> files,
>> then use shell command to cat them all back into one bigger file.
>>
>> HTH,
>> Dan
>>
>>
>> On 4/19/07, molemenacer <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>> Hi all,
>>>
>>> I have backed up a database using mysqldump and have a .sql script that
>>> is
>>> over 2GB in size.  I am trying to open this file to view it and make
>>> some
>>> changes.  I have not been able to find a program that can open this
>>> file.
>>>
>>> Does anyone have any suggestions as to a program that can do this?
>>>
>>> Thanks in advance
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Trying-to-open-a-big-sql-script-tf3606302.html#a10075570
>>> Sent from the MySQL - General mailing list archive at Nabble.com.
>>>
>>>
>>> --
>>> MySQL General Mailing List
>>> For list archives: http://lists.mysql.com/mysql
>>> To unsubscribe:
>>> http://lists.mysql.com/[EMAIL PROTECTED]
>>>
>>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Trying-to-open-a-big-sql-script-tf3606302.html#a10078655
> Sent from the MySQL - General mailing list archive at Nabble.com.
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>
>
> --
> This message has been scanned for viruses and
> dangerous content by OpenProtect(http://www.openprotect.com), and is
> believed to be clean.
>



-- 
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to