MySQL: Source Error 2? No File Found [closed] - mysql

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
When I tried to source for a particular .sql file, namely 'registrar.sql', the following error is displayed:
Failed to open file 'registrar.sql', error: 2
I know that this means the below error:
#define ENOENT 2 /* No such file or directory */
However, I am not sure how to be more specific as I have tried entering 'source registrar.sql' and I have tried entering the absolute path. Now it is possible I am just entering the absolute path incorrect which is where I could use some help. Here is the path in properties in windows.
C:\Program Files\MySQL\MySQL Server 5.1\bin
File name is: registrar.sql
Any help on this would be appreciated.

Try like this:
mysql> source c:/dumps/mydatabase.sql
That is, use forward slash instead of back slash

You need to restart mysql if you have copied file after starting mysql server.
also if you have space in file or folder name you should use quotes.

I think that the sql process might not have read access to your directory anyway. In which case, you might have to copy the sql file to other accessible folder and tell mysql the absolute path.

Remove spaces in the folder names of the path, It worked for my mac path.
(Eg: change the folder name MySQL Server 5.1 to MySQLServer5.1)

Related

How to delete past working directories in Octave GUI?

Does anyone know how to delete those past working directories in Octave GUI? They are very annoying and useless.
I see from your image that you are on windows.
I don't know the equivalent directory on windows, but on linux, this information seems to be stored under ~/.config/octave/octave-gui.ini, in a section called current_directory_list which you can edit and clear of all unwanted entries.
See if you can find the equivalent folder where this octave-gui.ini file is stored on windows; it may be in an AppData/Local directory, or in the octave installation folder itself...
PS: In the same directory I also had a qt_settings file which seems to mirror some of this information, but I think this may have been from an older octave installation.
In addition to deleting the file path from octave-gui.ini, try removing the path from .octaverc file as well. This will remove the warning you see at launch if the path no longer exists.

ERROR in ngcc is already running at process with id xxxx [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
When I try to run ng serve command in my project it produce the below error.
ERROR in ngcc is already running at process with id xxxx
Try deleting your ngcc_lock_file in the path:
node_modules/#angular/compiler-cli/ngcc/ngcc_lock_file
Or for Angular 9, the lock file to delete is:
node_modules/#angular/compiler-cli/ngcc/__ngcc_lock_file__
I had the same issue and I and deleted that file and it started working for me.
rm node_modules/#angular/compiler-cli/ngcc/__ngcc_lock_file__
Working Solution
Delete all node modules
Close any working terminal or you can shut down your PC if you cant make sure that you've closed all working terminals
run npm i to setup your modules
run ng s
It's working with me well !
The problem is most-likely a unique case.
Make sure you don't run other ng serve in parallel.
Stop current processes running and retry.
Reload your computer and try again.
If that does not help
Post a full log, so it is possible to troubleshoot your problem.

windows could not start the MySQL. service on local computer. Error 2 : The system cannot find the file specified

I am not able to start the MySQL server on my Windows system. When I tried in services.msc to run, I got this error:
Starting it through the XAMPP control panel does not work either:
Can you help me to solve this?
Open windows services (Start->run ->Services.MSC)
Find service with name "Mysql Server" and check path, it should be something like that:
"C:\Program Files (x86)\Parallels\Plesk\Databases\MySQL51\bin\mysqld.exe" "--defaults-file=C:\Program Files (x86)\Parallels\Plesk\Databases\MySQL\Data\my.ini" MySQL
Make sure that Mysql folder and executable file mentioned above exist by this path.
OR
Sometimes the file name of mysqld-nt.exe renamed to mysqld-nt.exe~ so rename it back to its original name and this may solve the problem.
Go to the path: C:Programs Files\MariaDB 10.2\data..
Lookout for my.ini file. Open the file and check the path for "datadir".
If that does not match to your installed directory then update it.
Your problem will be solved for sure.
I faced the same problem and solved it.
Just modify the registry editor value.
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/MySQL/ImagePath

dbext not finding sql snippets to execute

I'm trying to use the dbext vim plugin to connect to a MySQL database.
When I give commands like <Leader>se I get an error:
Can't open file
/var/folders/b3/s3wyytf90_ld113h1w3p86ldcg4glv/T/vQ0XMX3/7
That file doesn't exist. But the SQL I expect to be executed does exist in:
/var/folders/b3/s3wyytf90_ld113h1w3p86ldcg4glv/T/vQ0XMX3/dbext.sql
So it looks as if the plugin is writing a temp file in one location and looking for it in another.
I'm sure the plugin can't be broken and I must have done something wrong, but I don't know enough Vimscript to follow it through.
I have Vim v7.3, dbext 20.00 and have just installed by unzipping the plugin zip into my .vim directory.
I've used
:DBPromptForBufferParameters
to set up my connection parameters.
The full error looks like:
dbext: Executing SQL at 13:54
Error detected while processing function dbext#DB_execSql..dbext#DB_execFuncTypeWCheck..<SNR>42_DB_MYSQL_execSql..<SNR>42_DB_runCmd:
line 24:
E484: Can't open file /var/folders/b3/s3wyytf90_ld113h1w3p86ldcg4glv/T/v0BN3Qw/7
Press ENTER or type command to continue
Can anyone point me in the right direction to resolve this?
Edit: I've since tried an install into an empty .vim directory, with all of my other config and plugins removed, so I don't think that it's a case of conflicting configuration.
I'm running MacOSX, in case it's relevant.
Dumb mistake on my part.
I was supplying a bare password which needed to be quoted in this context due to a special character.
I'm now quoting the password when prompted for it by :DBPromptForBufferParameters and everything is working.

Error while trying to build schema in symfony1.4 project

I'm trying to build up a new project with Symfony1.4.
I'm not new to Symfony but today I faced with a new problem, never seen before.
When trying to run
php symfony doctrine:build-schema
i revieve this error
Warning: mkdir(): SAFE MODE Restriction in effect. The script whose uid is 10045
is not allowed to access /tmp owned by uid 0 in /var/www/vhosts/my site.it/httpdocs/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/
doctrine/Doctrine/Lib.php on line 292
So, my question is, how can I solve this problem?
It seems that doctrine save a temporary file in /tmp dir, where I cannot access.
Can I maybe change it somewhere?
Yes. The error seems to be occurring because Symfony is trying to create a directory and it's incapable of doing so because of permissions.
If you open
/var/www/vhosts/mysite.it/httpdocs/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Lib.php
You can see this line of code on 292
return mkdir(trim($path), $mode, true);
$path contains the path to a directory that Doctrine is trying to unsuccessfully generate. It could be your mysite.it\httpdocs\data directory where the fixtures or schema.yml is kept.
Try doing a die(var_dump($path)); just before the above line to see what the path of the directory is. Then you might need to physically create it yourself on the file system.