Forum Replies Created
-
AuthorPosts
-
peterlaursenParticipantQuote:But that would not explain why the script runs from within the Scheduled Backup Wizard, but not when run from Tack Scheduler or through START – RUN, does it?
There are lots of issues with the windows built-in scheduler.
Can you run it from command line like
sja myjobfile.xml
– then it is not an SQLyog issue.
peterlaursenParticipantThis is preciselly what you can!
Actually I mentioned exactly this in my articel here:
http://www.webyog.com/forums/index.php?showtopic=1507
Look about in the middle of the article …
peterlaursenParticipantThere is no functionality for this is SQLyog. It also is a little dangerous if the autoincr-field is referenced!
You can do as you do, or you can drop the autoincrement-column and create it again. Then rows will be re-numbered
Lots of discussions on the matter here:
peterlaursenParticipantEDIT: changed some nonsense that I wrote
You should never write two mails at the same time! 😮
peterlaursenParticipantAre you sure that you are talking about ODBC-import ??
Quote:I have tried importing from dbf, xlsThe SQLyog ODBC-import lets you connect to the source database directly.
To get data from Excel into MySQL there are more ways – for instance:
*save as CSV
*export from EXCEL into MySQL (you must have the MyODBC-driver installed).
(these are the traditional ones)
However with SQLyog 4.1 the best way is I think (provided that you have Access too):
Open the Excel file in Access and save. It does not matter whether you “link” the data or “import” them. Now you can use SQLyog ODBC-tool with the Access(.mdb)-file.
Could you please explain a little more about what you are doing. Importing what sort of data from where to where??
If it is ODBC-import you want to do I can send you a paper on that if you PM me your mail adress.
peterlaursenParticipantQuote:I was hoping to avoid the text replacement …Â It's a bit troublesome when having 1mill+ recordsWhat (the hell) do you want that astronomic .csv-file for?
If you want to transfer data to another database consider other possibilities such as OBDC-import. Life is too short for CSV. There must be other options ?!
peterlaursenParticipantBTW – don't we miss a windows standard “where to save” dialogue here ?
peterlaursenParticipantI can generate this output
Quote:1~2004:07:23 09:32:50~~~2~2004:07:23 12:39:56~~~
3~2004:07:23 12:47:58~~~
4~^N~69935e452ad050b7bc904cca7691694b~^N~^N
7~^N~d347c0437fe7bc1be23571f0e6177e19~^N~^N
9~^N~e1259f8fcecabc833cff6b531a81d535~^N~^N
11~^N~c3818847c1eb36f00df27708752dcf21~^N~^N
241~2004:07:23 09:00:00~~~
243~2004:07:23 09:52:44~~~
248~2004:07:23 08:33:22~~~
etc
from the data and the export settings below.
Now a search for '^N' and replace with '' in a texteditor, and you got what you want.
If the escape character is not used I get
Quote:1~2004:07:23 09:32:50~~~2~2004:07:23 12:39:56~~~
3~2004:07:23 12:47:58~~~
4~NULL~69935e452ad050b7bc904cca7691694b~NULL~NULL
7~NULL~d347c0437fe7bc1be23571f0e6177e19~NULL~NULL
9~NULL~e1259f8fcecabc833cff6b531a81d535~NULL~NULL
11~NULL~c3818847c1eb36f00df27708752dcf21~NULL~NULL
241~2004:07:23 09:00:00~~~
243~2004:07:23 09:52:44~~~
etc.
But I think it is more safe to replace '^N' than 'NULL'. Or any other crazy escape character instead of '^' that is safe to use with your data . I just tested with '|' as well and that functions the same.
peterlaursenParticipantI am sorry I missed the point 😡
You asked for the default table type for a NEW table. Ritesh gave the answer. However, you can altter such settings from “MySQL Administrator” too, if you prefer.
It is available from http://dev.mysql.com
peterlaursenParticipantit is in the TODO, I know. Things like that, GUI query generator etc.
You could try the OpenOffice suite Beta2 http://www.openoffice.org. It can connect to Mysql with ODBC or JDBC. It has exactly this facility.
EDIT: while I was writing Ritesh answered …
peterlaursenParticipant1) From SQLyog GUI:
right click the table in Object browser … change table type to .. and choose what you'd like!
2) SQL
Execute this:
ALTER TABLE `dbname`.`tablename` type = ISAM;
(or whatever type).
Comment: The merge table type is really not interesting any more with modern OS's and filesystems It was created in order to be able to have very big databases exceeding the file size possible. But with Windows/NTFS or LINUX/EXT3FS there is no need for merge tables.
You can read about the merge table type in the MySQL documentation.
peterlaursenParticipantThis is not SQLyog! SQLyog is a MySQl tool and not a php tool.
A string is a string. SQLyog does not recognize that strings starting with $ is a php-variable.
I really believe you are messing up MySQL and php! Even MySQL does not recognize what are the actual values of a variable of a php script. In only exist in memory as long as that script runs. It is not in the database.
It is only inside a php script – and only as long as it runs – that the variable “$varsentence” has the value of “mary had a little goat”. MySQL does not know! In the mySQl database the string '$varsentence' is stored and nothing else. There might be php-scripts, pearl, python, C- and delphi and java programs (just to mention a few!) use that variable for some purpose. How should SQLyog know anything else than the database. It has no chance to know about the values in memory of a script running yesterday!
To MySQL and SQLyog only the string '$varsentence' exists. What programs use it for (for a varibale name for instance) is not a matter for neither MySQL or SQLyog.
You simple mess up where database (MySQL) ends and code (php) starts. You can't do things that way! Put “mary had a little goat” in the database and SQLyog will read it!
peterlaursenParticipantYes …
simply set default CURRENT_TIMESTAMP and time of creation wil be inserted.
A more advanced one:
timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
will do as the first, but when ANY row is updated the timestamp field will be updated too.
Refer to the MySQL documentation for more details. Search for “CURRENT_TIMESTAMP”
Was that the answer to your question ??
peterlaursenParticipantQuote:Any idea what I am doing wrong in trying to connect to the MySQL server?Most likely you will have to use some sort of tunnelling to connect. Refer to the SQLyog helpfile on that. Is says to be a “secure” server. What protocol does it allow for: HHTPS, SSH ???
Quote:Am I correct in believing that SQLyog will allow me to create a MySQL database visually, similar to Access or Excel in visual layout?Acces and MySQL are not comparable – they are two very diffent things. You should not expect SQLyog to present a MySQL database as Access presents its databases. But it is a GUI (=visual) tool.
peterlaursenParticipantQuote:but I always get the text $variable appearing instead of the actual value of the variable.I think I understand better now! Well yes of course you do! A variable name entered in a char/varchar field is just a string. Just like 'peter', 'my dog' and 'this is a very long string' are strings, '$variable' is a string too.
SQLyog is not a tool for code execution (except for SQL-code). It is a GUI tool for administering MySQL.
-
AuthorPosts